First setup your react-native platform.
Follow the official [Facebook] (https://facebook.github.io/react-native/docs/0.58/getting-started.html) doc. Make sure you use Google APIs Intel x86 Atom System Image
for your simulator for 0.58.
Not covered above, but you will also need to install gradle
to build the app for release. I recommend installing with ASDF (Gradle plugin I used for asdf)
npx jetify (which is run as a postInstall script) will no longer be needed once the upgrade to react native 0.60 is done
- Sometimes a new emulator will not see the packager. If you've followed the Facebook guide and pulled from the repo recently, try opening the dev menu in your emulator (CMD+M on mac), clicking on
Dev Settings
, clicking onDebug server host & port for device
, and typing inlocalhost:8081
(or whatever port your metro bundler is running on) as the port.
Follow the official [Facebook] (https://facebook.github.io/react-native/docs/0.58/getting-started.html) doc for 0.58.
Make sure you are on XCode 10.2
Make sure you run cd ios && pod install
You must install cocoapods if you don't already have them,
sudo gem install cocoapods
You must install fastlane if you want to deploy new iOS builds
https://docs.fastlane.tools/getting-started/ios/setup/#rubygems-macoslinuxwindows
yarn
- [iOS only]
cd ios && pod install && cd ..
react-native link
react-native run-ios
orreact-native run-android
Luis wrote a small react-native-clean
script. Kill your Metro Bundler, run react-native-clean
, and run react-native-run-*
again to get a fresh, artisinal, hand-crafted, non-GMO, fully vaccinated, grass-fed build.
Sometimes, a JS refresh is not enough to update code, especially if you recently added functionality that utilizes native code.
Also, please run this before merging a new branch to ensure that your changes still result in a clean build. Slack him if you need it.
IOS
fastlane ios beta
for new Testflight build
For new apple App Store build, open ios/info.plist
. Increment the field CFBundleShortVersionString
and CFBundleVersion
ANDROID
- Open
/android/app/build.gradle
and manually increment the versionCode field. fastlane android beta
for new Android build. (Alternatively,cd android && gradle clean assembleRelease
)- Go into
android/app/build/outputs/apk/release
, rename the APK toMood.dev.apk
and upload it to Google Drive. Rename the same APK toMood.apk
, log into Play Console, and use it to create a new release there.
Key was generated by google support suggested command
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
and pem file exp withkeytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
For iOS
In the root dir,
fastlane snapshot
cd fastlane/ios_screenshots
fastlane frameit black
cd ..
fastlane deliver
For Android Go to https://developer.android.com/distribute/marketing-tools/device-art-generator Drag each screenshot over to the Pixel 2 icon Save image as
TODO: Find a way to automate these with fastlane screengrab + an imagemagick script? similar to what frameit does but for android