Cannot run application on simulator after installing Xcode 11 - CFBundleVersion error

后端 未结 16 1430
醉梦人生
醉梦人生 2020-12-15 02:50

Yesterday, I\'ve downloaded beta version of Xcode 11. After that, I\'ve opened my project and tried to run with new Xcode. Unfortunately error has occurred with message:

16条回答
  •  旧巷少年郎
    2020-12-15 03:18

    Combining Sgeven.Zheng and Cristik's answers.

    CAUSE

    Installing Xcode11 Beta installs a new version of CoreSimulator.framework with the following update:

    https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_release_notes

    "Bundles without a CFBundleVersion are invalid and can't be properly installed on devices or simulators. CoreSimulator now checks and rejects such bundles earlier in the process with a clearer error message. (49892531)"

    The following won't fix the issue:

    • Uninstalling Xcode11 Beta
    • Uninstalling and reinstalling Xcode 10

    This is because CoreSimulator.framework is installed in /Library/Developer/PrivateFrameworks/CoreSimulator.framework, which is outside the Xcode.app bundle. When re-installed, xcode10 detects that the currently installed version of CoreSimulator.framework is newer than what xcode10 would have installed, so it leaves it as-is.

    SHORT-TERM FIX

    1. Uninstall xcode11
    2. Install Xcode 10 (No need to re-install if it's already installed)
    3. Remove /Library/Developer/PrivateFrameworks/CoreSimulator.framework
    4. Launch Xcode 10 and agree to install command line tools

    LONG-TERM FIX

    Since this is not a "real" bug but is instead the intended behavior of Xcode11, steps will eventually need to be taken to ensure that apps are always built with a valid CFBundleVersion.

提交回复
热议问题