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
mainbranch contains RN new architecture enabled setup. - The
old-archbranch contains RN old architecture setup.
- Start with RN old architecture setup (
old-archbranch) - Move to new architecture setup (
mainbranch)
| 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:iosor
yarn brownfield:ios:releaseReactBrownfield.xcframework will be generated in ios directory
- Run
yarn brownfield:androidto 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 startto start the Metro bundler.