CodePush:如何部署到同一部署配置的多个构建版本? [英] CodePush: How to deploy to multiple build versions of the same deployment config?

查看:69
本文介绍了CodePush:如何部署到同一部署配置的多个构建版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解理想情况下的部署模型,即所有用户始终将他们的应用更新到最新的应用商店版本.但实际上他们没有.如何使用 CodePush 处理 React-native iOS 应用程序的不同构建版本?考虑以下两种情况:

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) 我一直在使用 CodePush 将新的 js 包部署到我的应用程序的 1.0.0 版本.现在我发布 1.1.0 并希望通过 CodePush 提供新代码.据我所知,现在有一种同时部署到 1.0.0 和 1.1.0 的方法,既不是不同的包也不是同一个.因此,一旦我将捆绑包推送到 1.1.0,就无法更新未通过应用商店更新的 1.0.0 应用.

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) 据我所知,解决此问题的一种方法是仅发布具有增加的内部版本号 (CFBundleVersion) 但未更改版本字符串 (CFBundleShortVersionString) 的新版本.但这会产生影响,即使是新下载的最新应用商店版本(例如 1.1.0(8))也会始终首先在 codepush 上加载最新的包.

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?

推荐答案

我们计划很快优化此方案,因为正如您所提到的,我们意识到这种需求是多么普遍.

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

与此同时,我们建议的支持方式(以及我们的许多用户目前正在做的事情)是在与现有 1.0.0 相同的 CodePush 应用程序中为您的 1.1.0 版本创建新的 CodePush 部署部署,并在向商店提交 1.1.0 之前更新您的 Info.plist 文件以指向新的部署密钥.

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.

这样,您就可以向 1.0.0 用户和 1.1.0 用户发布更新.如果您想向两者发布相同的更新,您必须运行两次 release 命令,但如果您的更新只针对一个,您只需将其发布到相应的部署即可.

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.

我们将在下个月简化这种体验,我很想得到您关于我们如何最好地适应您的场景的反馈.如果您有任何其他问题/等,请随时直接给我发电子邮件 (joncart@microsoft.com).

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).

谢谢!

这篇关于CodePush:如何部署到同一部署配置的多个构建版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆