-
Notifications
You must be signed in to change notification settings - Fork 92
Migrate an Existing Test App
Contents
If it doesn't already exist, create app.json
at the root of your project.
{
"name": "Example",
"displayName": "Example",
"components": [
{
"appKey": "Example",
"displayName": "App"
}
],
"resources": [
"dist/res",
"dist/main.jsbundle"
]
}
For more details, see Manifest (app.json).
Keep the following files:
android
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
Enable Jetpack and AndroidX in gradle.properties
:
android.useAndroidX=true
android.enableJetifier=true
Take a look at Android Specifics to further customize the test app.
Finally, change settings.gradle
to the following (adjust the name and the path to test-app.gradle
accordingly):
rootProject.name='example'
apply from: file("../node_modules/react-native-test-app/test-app.gradle")
applyTestAppSettings(settings)
Keep the following files:
ios
├── Podfile
└── Podfile.lock
Change Podfile
to the following (adjust the workspace name and the path to test_app.rb
accordingly):
require_relative '../node_modules/react-native-test-app/test_app.rb'
workspace 'Example.xcworkspace'
use_test_app!
If you need to further customize the test app or additional pods, please see iOS and macOS Specifics.
Keep the following files:
macos
├── Podfile
└── Podfile.lock
Change Podfile
to the following (adjust the workspace name and the path to test_app.rb
accordingly):
require_relative '../node_modules/react-native-test-app/macos/test_app.rb'
workspace 'Example.xcworkspace'
use_test_app!
If you need to further customize the test app or additional pods, please see iOS and macOS Specifics.