This native modules allows you to use multiple bundles in your React Native app. It can be used directly as a standalone native module or as a reference for implementing your custom native module, septic to your needs.
This project is still work in progress:
- facebook/react-native#27844
- facebook/react-native#27855
- facebook/react-native#27875
- Refinements & cleanup
Apart from the changes in the RN (see React Native PRs above), you will need a bundles that will create a valid bundles that can work together and:
- Each non-initial bundle is available under
global[bundleName]
orthis[bundleName]
(when this refers to top-level global variable), for example bundleapp0
should be available underglobal['app0']
orthis['app0']
. - Each non-initial bundle's entry point must be exported as
default
export.
E2E are based on Appium/WDIO and are located in Example/e2e
directory.
- iOS:
carthage
(brew install carthage
) and installed Pods (cd ios && pod install
) - Android: running Android Emulator
To build the Example app and run E2E tests run:
yarn e2e:ios
yarn e2e:android
To only run E2E without building an app (assuming it was built before):
yarn e2e:run-ios
yarn e2e:run-android
Please make sure you have Android Emulator already running.
If iOS E2E test is crashing with message unable to create session, please make sure the following commands works:
cd Example/node_modules/appium-webdriveragent && \
carthage bootstrap --platform iOS,tvOS
If it fails, you need to tweak build/derived data paths in Xcode preferences:
Go to XCode -> Preferences -> Locations and set Derived Data
to Default
, then click Advanced and select Unique
.