dvine multimedia dvine multimedia - 1 month ago 12
iOS Question

CodePush: How to deploy to multiple build versions of the same deployment config?

I understand the deployment model for the ideal case, that all you users alway update their app to the latest app store version. But in reality they don't. How do I deal with different build versions of an react-native iOS app using CodePush? Consider following two scenarios:

1) I've been using CodePush to deploy new js bundels to the 1.0.0 build of my app. Now I release 1.1.0 and want to provide new code via CodePush. As far as I can see there is now way of deploying to 1.0.0 and 1.1.0 at the same time neither different bundles nor the same one. So once I pushed out a bundle to 1.1.0 there would be no way to update 1.0.0 apps that didn't update via the app store.

2) As far as I can tell, one way around this is releasing new versions only with an increased build number (CFBundleVersion) but an unchanged version string (CFBundleShortVersionString). But this has the effect, that even a freshly downloaded newest app store version (e.g. 1.1.0(8)) will always load the latest bundle on codepush first.

Is there a way to do this cleanly and without unnecessary updates?

Answer

We plan to optimize this scenario very soon, since as you mentioned, we realize how common of a need it is.

In the meantime, the way that we recommend supporting this (and what many of our users are currently doing) is to create a new CodePush deployment for your 1.1.0 release, within the same CodePush app as your existing 1.0.0 deployment, and update your Info.plist file to point at the new deployment key before submitting 1.1.0 to the store.

This way, you can release updates to both your 1.0.0 users and 1.1.0 users. If you want to release the same update to both, you'd have to run the release command twice, but if you have updates that only target one, you simply release it to the respective deployment.

This solution is working well for folks, and has the "benefit" of being very explicit about how you want to manage multiple binary versions in parallel, but it is obviously kind of hack-ish as well, and more verbose/clunky than it should be.

We'll be streamlining this experience this coming month and I'd love to get your feedback on how we could best accommodate your scenarios. Feel free to email me directly if you have any further questions/etc (joncart@microsoft.com).

Thanks!

Comments