Prepared with ❤️ for the React Native NYC Meetup on Nov 12, 2019. My talk is called Bridging a Native Module Doesn’t Have To Be Scary: Swift Edition. You can find the slides at https://usorov.com/rnnyctalk.pptx (if it's still up?)
Thanks to @bpolonia for organizing and @majorleaguesoccer for hosting!
This app was bootstrapped via react-native init and uses react-native 0.61.4. iOS only (because we're here for Swift).
The following native repos were used in the creation of this app:
- GradientView
- ScrollableGraphView
- InputBarAccessoryView (known issue with input text color becoming white if you have iOS system level dark mode on -- use with dark mode off)
- CameraBackground (won't work if running on simulator)
You need:
- XCode (preferably 11),
- CocoaPods,
- npm or yarn
To run the app:
- clone the repo to your machine,
- install node_modules
- cd into the ios directory, rm -rf Pods, rm Podfile.lock and then run pod install (requires CocoaPods; note: this is on purpose)
- cd back to the main directory, and do git reset --hard (will bring back some fixes to the native code that will allow the app to compile properly)
- run ./buildProd.sh (incase you don't want to run my script, feel free to look inside buildProd.sh and then execute that command). This builds the main.jsbundle file.
- turn on Metro bundler with npm/yarn start
- open up XCode and Run the app (open the .xcworkspace file) from there either onto a simulator or your device. In case the build fails because of an error that has to do with your Podfile being out of sync, go back to the iOS folder, run pod install again, and then try to run the app again.
- you will probably need to re-sign the app if you're loading it onto your own device