@nikki
hey
Nothing here yet.
Nothing here yet.
No blogs yet.
We didn't actually use the framework provided by https://github.com/facebook/react-native/blob/4454fdc219a7ea9e45c126a776d9fe07658328e6/ReactCommon/cxxreact/CxxModule.h and just directly bind to JavaScript through JavaScriptCore's C API. Most of our GL binding code lives at https://github.com/expo/expo/blob/98ab9ef6a35c6d2489764805800d60bb5e778d0a/cpp/UEXGL.cpp . The initialization of that is done by an Obj-C native module at https://github.com/expo/expo/blob/98ab9ef6a35c6d2489764805800d60bb5e778d0a/ios/Exponent/Versioned/Core/Api/GL/EXGLView.m . The build process for iOS involves just adding the .cpp files as usual in Xcode (in our case we have it as a subpod), and for Android you will need to use JNI as in https://github.com/expo/expo/blob/98ab9ef6a35c6d2489764805800d60bb5e778d0a/android/expoview/src/main/jni/Android.mk and bound with https://github.com/expo/expo/blob/98ab9ef6a35c6d2489764805800d60bb5e778d0a/android/expoview/src/main/jni/EXGL.cpp accessed from https://github.com/expo/expo/blob/98ab9ef6a35c6d2489764805800d60bb5e778d0a/android/expoview/src/main/java/host/exp/exponent/exgl/EXGL.java . In terms of 'difficulty' -- it's hard to quantize since that's relative, but I would say that in the grand scheme of things the build system isn't the most difficult part, if only less defined and less documented. Actually writing the binding code is the most important bit, and is about linear in the complexity of API you want to bind. In the cpp/ directory we have some other utilities we've used in the binding. In terms of 'recommendation' -- that's a hard judgement to make in the abstract, but concretely given a particular use case, yes it could make sense, if that is the main and only way to achieve the result you want. I would say try using the 'CxxModule' system as provided by React Native (you'll have to watch for including the headers and linking with React Native's code properly) -- we didn't do this, so have no examples to point to there. The way we did it (direct JSC C bindings) means you know exactly what's going on under the hood, which could also be what you want.
Hi! Once you have an Exponent app that you want to publish to the App Store or Play Store just follow this guide: https://docs.getexponent.com/versions/v11.0.0/guides/building-standalone-apps.html This gives you a regular app for either app store that looks and feels like any app on such a store would and is installed in exactly the same way! Since you're using Exponent, if you update your app's JavaScript code and re-publish, a user using an app store version will instantly get the update the next time they open that app.