- Make sure your Node.js version is ^10
- Please follow this React Native getting started docs under React Native CLI Quickstart tab before run any scripts
- Run
yarn
to install dependencies - Run
npm install -g code-push-cli
to install Code Push CLI - Run
code-push register
to login to App Center - Run
code-push app add YourAppNameAndroid android react-native
to add app on App Center for Android app - Run
code-push app add YourAppNameIos ios react-native
to add app on App Center for iOS app
*don't forget to save your Deployment key
- Follow setup instruction for each device here: Android, iOS, Windows Mobile
- Paste your Android and iOS staging deployment key in
packages/mobile/android/app/src/main/res/values/strings.xml
<string name="CodePushDeploymentKey" moduleConfig="true" translatable="false">deployment-key-here</string>
*you can change to production deployment key later.
Run yarn web
to preview on web
Run yarn desktop
to preview on desktop
Follow this React Native instructions before run RN on mobile or physical device script below
Run yarn android
to preview on android
Make sure you run this script before run on iOS cd ios && pod install
Run yarn ios
to preview on iOS
- Make new repository on GitHub and push this repo
- Change
package.json
repository url on root folder with your new repo
...
"repository": {
"type": "git",
"url": "https://github.com/yourGitHubUsername/yourRepositoryName.git"
},
...
- Change
dev-app-update.yml
owner & repo on root folder with your new repo
owner: yourGitHubUsername
repo: yourRepositoryName
provider: github
- Create personal access token on GitHub. You can follow the instructions here.
- Run
export GH_TOKEN=yourGithubPersonalAccessToken
via bash on your root folder - Run
export CSC_IDENTITY_AUTO_DISCOVERY=false
to disable code signing during the build process on Mac - Run
yarn desktop:deploy
to build and publish your app on GitHub release (see All Script to choose specific platform) - Go to your GitHub repository page, click "releases" tab. Click on "Edit", and then "Publish" to finalize the release
- Increment the "version" number in
package.json
and make any visual change so you can notice the update easily
...
"version": "0.0.2",
...
- Run
yarn desktop:deploy
again and finalize your release - Download, install and run the previous version of your app from GitHub release page. Or you can decrease "version" number in
package.json
and undo any change on your repo. Then runyarn desktop
. - After the new version of your app is downloaded, click "Relaunch" and wait until it open again with the latest version.
- Run
yarn android
oryarn ios
- "Disable Fast Refresh" in the React Native developer menu. See documentation here.
- Make any visual change so you can notice the update easily
- Run
code-push release-react YourAppNameAndroid android
(for iOS use "YourAppNameIos ios") - Wait a while. You will see update popup on your mobile screen.
- Run
yarn android:clear
to clear cache gradlew - Run
yarn android:build-w
to build APK on Windows (for Mac useyarn android:build-m
) - APK Debug created on the following folder
android/app/build/outputs/apk/
- React Native: Code Push_(Part 1) Android Staging
- React Native: Code Push_(Part 2) Android Production
- React Native: Code Push_(Part 3) iOS Staging
- React Native: Code Push_(Part 4) iOS Production
- How to rapidly update your React Native android project using Code Push without app store upload
- Code Push API
- Electron Documentation - autoUpdater
- Electron Builder Auto Update
- Creating and deploying an auto-updating Electron app for Mac and Windows using electron-builder
-
Run
yarn
to install dependencies -
Run
yarn web
to preview on web -
Run
yarn web-build
to build web version -
Run
yarn desktop
to preview on desktop -
Run
yarn desktop-build
to build desktop app for all platform (Mac, Windows & Linux) *this script only support on Mac -
Run
yarn desktop-build-m
to build desktop app for Mac only *this script only support on Mac -
Run
yarn desktop-build-w
to build desktop app for Windows only -
Run
yarn desktop-build-l
to build desktop app for Linux only -
Run
yarn makecert-w
to make certivication desktop app for Windows only *this script only support on Windows -
Run
yarn desktop-deploy
to publish release to GitHub for all platform (Mac, Windows & Linux) *this script only support on Mac -
Run
yarn desktop-deploy-m
to publish release to GitHub for Mac only *this script only support on Mac -
Run
yarn desktop-deploy-w
to publish release to GitHub for Windows only -
Run
yarn desktop-deploy-l
to publish release to GitHub for Linux only -
Run
yarn android
to preview on android -
Run
yarn ios
to preview on iOS -
Run
yarn clear
to clear dependencies and clear cache for Mac only *this script only support on Mac -
Run
yarn clear-w
to clear dependencies and clear cache for Windows only -
Run
yarn clear-a
to rebuild gradle Android -
Run
yarn uninstall-a
to uninstall app on Android device