4 ms·
Will React Native finally support exchanging BINARY data (ArrayBuffer, TypedArray) across the bridge? Thus far I have to send binary data as base64 encoded str
by ItsMe000001 8y ago
Will React Native finally support exchanging BINARY data (ArrayBuffer, TypedArray) across the bridge?
Thus far I have to send binary data as base64 encoded strings! See react-native-fetch-blob for an example, when I read a file.
Current state:
Example, issue: https://github.com/facebook/react-native/issues/1424 https://github.com/facebook/react-native/issues/1424 (closed but not solved, quote: "We are trying to keep issues focused on bugs and this is more of a feature request")
Documentation for native modules, which kinds of data can be sent back to Javascript: https://facebook.github.io/react-native/docs/native-modules-ios.html#argument-types https://facebook.github.io/react-native/docs/native-modules-... (here the iOS docs, but it's the exact same for Android/Java)
- nikki93 8y agoI’ve managed to do this with direct access to the JSC C API — you could probably write an interop w/ Obj-C / JNI.
- ItsMe000001 8y agoAny pointers or code?
- morenoh149 8y agohttp://devdocs.io/react_native/native-modules-android http://devdocs.io/react_native/native-modules-android http://devdocs.io/react_native/native-modules-ios http://devdocs.io/react_native/native-modules-ios http://devdocs.io/react_native/communication-ios http://devdocs.io/react_native/communication-ios
- ItsMe000001 8y agoThat's the regular RN documentation - which is of ZERO help here. Please check the topic of this sub-conversation - you missed it. Hint: The parent mentions the "JSC C API". You point to Java and Objective-C - that alone should give you a hint that something is wrong with your links, that they don't quite fit into the conversation. That's the equivalent of a physics question where you want Watts and get Newtons - a unit mismatch as an indicator that you solved the wrong problem or the problem wrong. And just to say that too, I'm the co-maintainer of a popular native package for RN, so I'm already quite familiar with the RN native API for both Android and iOS.
- spicyj 8y agoLikely yes.