xcode 应用程序的Info.plist不包含有效的CFBundleVersion

o4hqfura  于 2023-08-07  发布在  其他
关注(0)|答案(3)|浏览(191)

我试图在XCode 13中启动一个旧的iOS应用程序,但在构建失败后,它一直给我这个错误:

Details

Failed to install the requested application
Domain: NSPOSIXErrorDomain
Code: 22
Failure Reason: The application's Info.plist does not contain a valid CFBundleVersion.
Recovery Suggestion: Ensure your bundle contains a valid CFBundleVersion.
User Info: {
    IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
    bundleURL = "file:///Users/lukas/Library/Developer/Xcode/DerivedData/zidane-cugshiqqzwkexrgiylyvxcagbylt/Build/Products/Vedur_Dev-iphonesimulator/zidane.app/";
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone10,4";
    "device_osBuild" = "15.0 (19A339)";
    "device_platform" = "com.apple.platform.iphonesimulator";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = "x86_64";
    "operation_duration_ms" = 87;
    "operation_errorCode" = 22;
    "operation_errorDomain" = NSPOSIXErrorDomain;
    "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphonesimulator";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_swiftVersion" = "5.5";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphonesimulator15.0";
    "sdk_osVersion" = "15.0";
    "sdk_variant" = iphonesimulator;
}
--

System Information

macOS Version 11.6 (Build 20G165)
Xcode 13.0 (19234) (Build 13A233)
Timestamp: 2021-10-06T08:33:19Z

字符串
我对Xcode很陌生,所以我不知道该怎么做。我检查了Info.plist并将我自己的版本号设置为3。

的数据



我只是不知道什么是有效的构建版本,在哪里可以找到它。我见过类似的问题,其中构建版本号丢失,但没有什么会谈论构建版本无效。

w8biq8rn

w8biq8rn1#

将$(CURRENT_PROJECT_VERSION)设置为CFBundleVersion的值是解决此问题的方法。

kuhbmx9i

kuhbmx9i2#

如果项目中有两个名为Resources的文件夹,也会发生这种情况。这是我的遭遇将其中一个资源文件夹重命名为其他文件夹,修复了此问题。

5jdjgkvh

5jdjgkvh3#

通过设置构建设置,确保启用生成Info.plist文件:
第一个月

相关问题