Once your app is configured and distributed to your users, and you have made some JS or asset changes, it's time to release them. The recommended way to release them is using the
Before you can start releasing updates, log into App Center by running the
appcenter login command.
In its most basic form, this command only requires one parameter: your owner name + "/" + app name.
appcenter codepush release-react -a <ownerName>/<appName> appcenter codepush release-react -a <ownerName>/MyApp-iOS appcenter codepush release-react -a <ownerName>/MyApp-Android
By using the App Center CLI
set-current function you no longer must use the -a flag to specify which app a command is directed at.
release-react command enables such a simple workflow because it provides many sensible defaults (like generating a release bundle, assuming your app's entry file on iOS is either
index.js). However, all of these defaults can be customized to allow incremental flexibility as necessary, which makes it a good fit for most scenarios.
# Release a mandatory update with a changelog appcenter codepush release-react -a <ownerName>/MyApp-iOS -m --description "Modified the header color" # Release an update for an app that uses a non-standard entry file name, and also capture # the sourcemap file generated by react-native bundle appcenter codepush release-react -a <ownerName>/MyApp-iOS --entry-file MyApp.js --sourcemap-output ../maps/MyApp.map # Release a dev Android build to 1/4 of your end users appcenter codepush release-react -a <ownerName>/MyApp-Android --rollout 25% --development true # Release an update that targets users running any 1.1.* binary, as opposed to # limiting the update to exact version name in the build.gradle file appcenter codepush release-react -a <ownerName>/MyApp-Android --target-binary-version "~1.1.0"
The CodePush client supports differential updates, so even though you're releasing your JS bundle and assets on every update, your end users will only download the files they need. The service handles this process automatically.
For more information about how the
release-react command works, and the various parameters it exposes, see to the CLI docs. Additionally, if you'd prefer running the
react-native bundle command yourself, and want a more flexible solution than
release-react, see the
release command docs for more information.
Submit and view feedback for