Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing Android *and* iOS versions #569

Closed
mikelambert opened this issue Oct 18, 2016 · 6 comments
Closed

Pushing Android *and* iOS versions #569

mikelambert opened this issue Oct 18, 2016 · 6 comments

Comments

@mikelambert
Copy link
Contributor

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!

@richardhuaaa
Copy link
Contributor

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:

  1. CodePush deployments do not track, or have any concept of platform (Android/iOS)
  2. The release-react command can only release one platform at a time
  3. An Android bundle released to an iOS app, or vice versa, will be silently rejected by our SDK

Does 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!

@mikelambert
Copy link
Contributor Author

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.

@richardhuaaa
Copy link
Contributor

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!

@richardhuaaa
Copy link
Contributor

I've updated the GitHub docs, the docs on the website will be updated later. Thanks :)

@krizpoon
Copy link

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 :(

@sergey-akhalkov
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants