react-native - appcenter codepush 更新 Android 但不更新 iOS : not released because it is identical to the contents of the specified deployment's current release

标签 react-native visual-studio-app-center code-push

作为我们管道的一部分,每当我们合并到 master 时,我们都会为 Android 和 iOS 运行以下命令:

# For the android app
appcenter codepush release-react -a the-android-app --target-binary-version $APP_VERSION -d $ENVIRONMENT

# For the ios app
appcenter codepush release-react -a the-ios-app --target-binary-version $APP_VERSION -d $ENVIRONMENT

在某些情况下,我们可能会合并一个不包含对应用程序的任何更改(仅配置等)的分支。在这些情况下,我们会看到以下问题:

iOS 构建有以下错误:

Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.

但是 Android 版本没有有这个错误,虽然代码是一样的。这会导致我们的 codepush 版本针对 Android 而不是针对 iOS,并且两个“相同”应用程序的版本号不同步。

我尝试将 --disable-duplicate-release-error 标志传递给 appcenter 命令,但这只会导致错误更改为警告。由于 Android 构建一开始就没有错误,因此此更改不能解决问题。

问题:有什么办法可以 a) 配置 Android 在没有变化的情况下不发布新的代码版本,或者 b) 配置 iOS 匹配 Android 的行为和即使没有更改,是否 创建了一个新版本?选项 a 会更可取,因为我认为该行为更有意义,但两者都比当前行为更好。

最佳答案

你只需要从 Xcode 增加版本。比发布 ios 应用程序比代码推送更新命令更有效

enter image description here

关于react-native - appcenter codepush 更新 Android 但不更新 iOS : not released because it is identical to the contents of the specified deployment's current release,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71603993/

相关文章:

reactjs - 如何将 React Native 集成到现有的 iOS 项目中

Xamarin Forms AppCenter 崩溃,发送到类的选择器无法识别

xamarin.android - Mobile Center 是 Xamarin Build 失败并出现 pthread_mutex_lock 错误

react-native - React Native codePush 重启后回滚

iOS React Native 应用程序不会从 CodePush 服务器更新

react-native - 代码推送检查更新

javascript - 如何使用变量作为图像源

react-native - 嵌套文本未对齐(React Native)

javascript - 如何使用 react-native 的 PushNotificationIOS.getInitialNotification

xcode - 在 Mobile Center 上构建时是否有一种方便的方法来增加内部版本号?