This app demonstrates how to integrate a single activity with react native view
- Open
rnapp/index.js
- Do required changes in
index.js
file
-
Connect physical device and do
yarn start
from rnapp folder -
To debug go to url
http://localhost:8081/debugger-ui/
-
To view metro bundled js file
http://localhost:8081/index.delta?platform=android&dev=true
-
Inorder to reload js files on your activity type
adb shell input keyevent 82
it will enable debug menu to reload -
If you are on emulator press
Command ⌘ + M
- Generate JSK file
keytool -genkey -alias <some_name> -keypass <some_password> -keyalg RSA -keystore codepushandroid.jks
- Login to appcenter cli
npm install -g appcenter-cli
appcenter login
appcenter apps list
appcenter apps set-current <your_project>
- Create token
appcenter codepush deployment add -a <your_project> Staging
appcenter codepush deployment list --displayKeys
- To upload
index.js
bundle
code-push release-react <your_project> android
(or)
appcenter codepush release-react -a <your_project> -d Staging
yarn build
will generate bundle onsrc/main/assets/index.android.bundle
- Then build signed APK
https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli