且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

安装Xcode 11后无法在模拟器上运行应用程序-CFBundleVersion错误

更新时间:2022-04-17 03:34:37

此处的答案中存在很多错误信息,因此我想提供权威的答复.

There is a lot of misinformation in the answers here, so I wanted to provide an authoritative response.

这里的问题是,带有Xcode 11 beta的CoreSimulator.framework新版本在CFBundleVersion上进行了验证,而以前的版本则没有.这些检查是有效的,并且确实代表您的应用程序中的问题,但是在Xcode 11 Beta 1中执行检查的方式也存在一个错误,这使问题更加复杂.

The issue here is that the new version of CoreSimulator.framework with Xcode 11 beta does validation on CFBundleVersion that previous versions did not do. These checks are valid, and it does represent an issue in your application, but there's also a bug in how the checks were performed in Xcode 11 Beta 1 which compounds the issue.

首先,在您的Info.plist中修复CFBundleVersion.它应该仅由数字组成,并且最多可以包含两个句点(即##.[.## [.##]],例如:12.4.2).

First, fix the CFBundleVersion in your Info.plist. It should consist of only numbers and up to two periods (ie ##.[.##[.##]], eg: 12.4.2).

第二,修复CFBundleVersion之后,您需要killall -9 CoreSimulatorBridge,因为很遗憾,旧值已缓存在CoreSimulatorBridge中,从而阻止了它识别新值.这部分是一个错误,已在Xcode 11 Beta 2中解决.

Second, after fixing CFBundleVersion, you need to killall -9 CoreSimulatorBridge because the old value is unfortunately cached in CoreSimulatorBridge, preventing it from recognizing the new value. This part was a bug, and it was addressed in Xcode 11 Beta 2.