观察套件 CFBundleVersion

Watch kit CFBundleVersion

手表套件集成规划

错误:您的 WatchKit 应用 Info.plist (1) 中的 CFBundleVersion 值与配套应用 Info.plist (2.0) 中的值不匹配。这些值需要匹配。

遇到上述错误。
- 更改了通知和 watchkit 应用程序的部署目标。但是构建失败

谢谢。

您需要确保 WatchKit App Info.plist 中的 CFBundleVersionparent app’s [=16] 中的 CFBundleVersion 相同=].

对于那些努力将构建自动编号脚本(如 this one)调整为 WatchKit 并遇到同样可怕的 The value of CFBundleVersion in your WatchKit app's Info.plist ... does not match the value in your companion app's Info.plist ... 错误的人,这里是解决方案:设置Strip Debug Symbols During CopyNo 对于项目,删除所有目标的相同选项覆盖,进行清理 (Cmd+Shift+K) 并构建 (Cmd+B)。

免责声明:这与其说是一种解决方案,不如说是一种破解,我不知道它为什么有效,但这是我让我的自动编号脚本与 WatchKit 一起工作的唯一方法,我认为这些信息对某些人有用。如果您有更好的想法,请分享。


更新:终于找到一个real solution。事实证明,即使没有 UI,也可以通过手动编辑 project.pbxproj 轻松地将 运行 脚本添加到 WatchKit App 目标。谢谢你,柯蒂斯赫伯特!

error: The value of CFBundleVersion in your WatchKit app's Info.plist (14) does not match the value in your companion app's Info.plist (13). These values are required to match.

我终于弄清楚问题是我的配套应用程序的 Info.plist 的值等于 13,不等于 WatchKit 应用程序中的那个值。

因此您必须确保 Bundle version 面板在 each Info.plist 中的值匹配。

安装 WatchKit 应用程序后 extension.There 在

中发生冲突

Bundle versions string, short && Bundle version .

因此,将 Keys 更新为在 info.plist 文件中的扩展和主应用程序目标中都相等的值.

                                 &&

当您在更新内部版本号或版本后遇到此类问题时。请按照对我有用的步骤进行操作:

  1. 清理项目
  2. 尝试在任一模拟器中运行项目
  3. 构建或存档

欢迎参加聚会。我能够通过编辑 Info.plist ion Watchkit App 和 Watchkit Extension 来解决这个问题,然后在 AppName(根级别)/Targets/AppName/Versioning/Marketing 版本中编辑营销版本。

希望这对遇到此问题的其他人有所帮助。