This repo showcases reference implementation of Callstack's modern brownfield approach using XCFramework/AAR integration of React Native into existing iOS and Android apps.
- The
main
branch contains RN new architecture enabled setup. - The
old-arch
branch contains RN old architecture setup.
- Start with RN old architecture setup (
old-arch
branch) - Move to new architecture setup (
main
branch)
Feature | iOS | Android |
---|---|---|
React Native | 0.78 | 0.78 |
React Native arch | new+old | new+old |
Follow these steps to build the app as .xcframework
:
- Install dependencies
yarn install
- Install pods
yarn pods
- Build the app as framework
yarn brownfield:ios
or
yarn brownfield:ios:release
ReactBrownfield.xcframework
will be generated in ios
directory
- Run
yarn brownfield:android
to build the AAR file. - In the NativeHost (
test-apps/android
), perform Gradle Sync to use the latest AAR file. - Run the app from Android Studio.
- If you build the Debug variant, run
yarn start
to start the Metro bundler.