1

So I have an React Native iOS app where I am successfully able to push my latest changes with the command:

code-push release-react Laybium ios -m --description "Modified code"

When I reload the app on my phone the new code is immediately used. What I don't understand is why there is a Production environment? Is there a way for me to push my changes to a subset of iPhones in the Staging environment?

If not then if I do code-push promote Laybium Staging Production what's the point if the newest code is already on all of the iPhones' with the app?

I understand the need for a Production environment if there is a way for me to push my Staging changes to a specific set of iPhones but I can't find any documentation for how to do this.

letter Q
  • 14,735
  • 33
  • 79
  • 118

1 Answers1

0

There are two keys for your CodePush app:

  • Staging
  • Production

'code-push release-react' publishes to the Staging key.

'code-push promote' promotes the Staging release to the Production key.

Users of your app should have a build that points only to the Production key.

On your own devices you can have two builds of the app: the regular release build with the Production key AND another build of the app that has the CodePush key changed to the Staging key. When you release-react only you (and others with the Staging build) will get the update; after verifying the update you then do the 'promote' and the users with the Production key build will get the update.

huntharo
  • 2,616
  • 21
  • 23