- node 8+, yarn 1.5+
- watchman
brew install watchman
- react-native-cli
yarn global add react-native-cli
- iOS Development Environment
- cocoapods v1.5+
brew install cocoapods
- Xcode 9
- cocoapods v1.5+
- Android Development Environment
- Follow the steps here
Launch screens and icons can be configured through the project's
env/env.[env_name].js
file using the appIconDir
and launchScreen
keys:
module.exports = {
....
"appIconDir": {
"ios": "src/assets/appIcon/ios",
"android": "src/assets/appIcon/android"
},
"launchScreen": {
"ios": {
"images": "src/assets/launchScreen/ios/Images.xcassets",
"xib": "src/assets/launchScreen/ios/LaunchScreen.xib"
},
"android": "src/assets/launchScreen/android"
}
}
Upon running flagship init
the specified files will be copied to the native
code and override the default icon and launch screen.
Files under src/assets/appIcon/ios
Contents.json
icon120x120.png // 120βΓβ120
icon180x180.png // 180βΓβ180
icon40x40.png // 40βΓβ40
icon58x58.png // 58βΓβ58
icon60x60.png // 60βΓβ60
icon80x80.png // 80βΓβ80
icon87x87.png // 87βΓβ87
Files under src/assets/appIcon/android
mipmap-hdpi
βββ ic_launcher.png // 72βΓβ72
mipmap-mdpi
βββ ic_launcher.png // 48βΓβ48
mipmap-xhdpi
βββ ic_launcher.png // 96βΓβ96
mipmap-xxhdpi
βββ ic_launcher.png // 144βΓβ144
src/assets/launchScreen/ios/Images.xcassets
should be an asset catalog of any
resources used in the launch screen xib file.
src/assets/launchScreen/ios/LaunchScreen.xib
should be a launch screen xib
file.
Files under src/assets/launchScreen/android
drawable-hdpi
βββ screen.png // 480βΓβ800
drawable-mdpi
βββ screen.png // 320βΓβ480
drawable-xhdpi
βββ screen.png // 720βΓβ1280
drawable-xxhdpi
βββ screen.png // 960βΓβ1600