Provide a template that has RN/typescript/fastlane/config for the community to start. Byebye to the days of 300+ lines of script to build ios/android with hard-coded in config. Bring some 12 factor love to your mobile apps!
Full article here
Install Node(10.15)
nvm install 10.15
or brew install node
Install watchman(4.9.0)
brew install watchman
Install yarn
brew install yarn --ignore-dependencies
Install CocoaPods: React-Native CocoaPods
brew install cocoapods
Please refer to https://facebook.github.io/react-native/docs/getting-started
- Install Xcode
- Install Xcode Command Line tools
xcode-select --install
- Install node modules
yarn
- Install CocoaPods dependencies
cd ios && pod install
This project is initiated with npx --ignore-existing react-native init <project-name> --template react-native-template-typescript
This project uses react-native-config to expose config variables to your javascript code in React Native. The .env
files are ignored by git keeping those secrets out of your repo.
- Copy
.env.example
to.env.local
or.env
- Add your config variables
- Follow instructions at https://github.com/luggit/react-native-config#setup
- Secrets are usually kept in
.env.secret
and should NEVER be git committed
Please make sure you update fastlane/Fastfile
with the correct config and syntax according to Fastlane docs
- for iOS, please note if
XCODE_AUTO_CODE_SIGN
should be true or false (manually manage code-signing)
Fastlane will load config from /config.*
file into .env
Secrets are to be provided in command line
MYAPP_CONFIG=prod yarn fastlane:ios-ci
MYAPP_KEYSTORE_PASSWORD=xxxxx MYAPP_CONFIG=prod yarn fastlane:android-ci