I'm a bit confused about the push model, and can't find the answers in the docs, so apologies for using the issue tracker here.
Using code-push release-react MyApp XXX, I can push android _or_ iOS. When I then check code-push deployments list MyApp, I can see the build I've just released, targeting the relevant versions. But the deployments don't list Android or iOS anywhere, which leaves me confused.
If I code-push release-react MyApp ios -t version, does that target version on Android _and_ iOS, or just iOS. I presume just iOS.
Does it target iOS by only distributing index.ios.bundle, such that Android continues to fall back to its older in-apk bundle on disk? I presume it's something like this, because that allows the -t version targeting and deployments list to remain platform-unaware.
At this point, how do I release builds to iOS _and_ Android? Doesn't each build I push out targeting an app version supercede the previous ones? (ie, I can't see any old version patches in my code-push deployments list MyApp) Is there a way to release both index.ios.bundle and index.android.bundle simultaneously?
And does that mean I should continue keeping my Android and iOS versions consistent with each other, such that if I need to target a build via -t, it will target across both platforms? (Versus having 1.0.7 mean something different on iOS vs Android, making JS targeting difficult given their potentially different native libraries that back their JS.)
Thanks!
Hi @mikelambert, apologies for the confusion here. To clarify - our recommended guidance is to make separate apps for each platform (i.e. MyApp-ios and MyApp-android). That way you can target changes on each platform separately and have different release cadences. As for the other subtleties raised in your question:
release-react command can only release one platform at a timeDoes this help?
We've tried to make this guidance clear (to have separate apps for each platform) in our docs, but as always there may still be room for improvement. If you have any suggestions, please let us know!
Ahh, using a separate app per-platform is a great idea, thanks!
I didn't see this mentioned in the documentation anywhere. They only mention stuff like:
https://microsoft.github.io/code-push/: For example: code-push release-react MyApp ios.
Same with the react-native doc, though it does at least have one place where it mentions AppName and AppName-android, though doesn't mention why or the justification for it.
Ahh, I see what we missed! I remember adding that guideline somewhere in the getting started, but yes, we should really make it clear in the examples. Thank you!
I've updated the GitHub docs, the docs on the website will be updated later. Thanks :)
I think the guideline should make it even more clear to state the reasons and consequences or make it an absolute must. Because I took it as a recommendation and now my app has been published and everything is too late :(
Hi @krizpoon, understand your concern here, could you please help us to improve the docs:
Note, if you are targeting both platforms it is recommended to create separate CodePush applications for each platform.
Should we just use something like you must instead of it is recommended or rephrase this at all?
Most helpful comment
Hi @mikelambert, apologies for the confusion here. To clarify - our recommended guidance is to make separate apps for each platform (i.e.
MyApp-iosandMyApp-android). That way you can target changes on each platform separately and have different release cadences. As for the other subtleties raised in your question:release-reactcommand can only release one platform at a timeDoes this help?
We've tried to make this guidance clear (to have separate apps for each platform) in our docs, but as always there may still be room for improvement. If you have any suggestions, please let us know!