尝试使用 Macbook Pro M2 部署到真正的 IOS 设备时,出现以下错误:
我在 VPN 和设备管理屏幕中找不到任何“选择您的开发者应用程序证书”选项:
这是错误消息:
验证您帐户的开发者应用程序证书在您的设备上受信任。打开设备上的“设置”并导航到“常规”->“VPN 和设备管理”,然后选择您的开发者应用程序证书以信任它。
下面是完整的堆栈跟踪:
The operation couldn’t be completed. (OSStatus error -10814.)
Domain: IDELaunchCoreDevice
Code: 0
Recovery Suggestion: Verify that the Developer App certificate for your account is trusted on your device. Open Settings on the device and navigate to General -> VPN & Device Management, then select your Developer App certificate to trust it.
User Info: {
DVTErrorCreationDateKey = "2023-12-23 10:42:00 +0000";
IDERunOperationFailingWorker = IDELaunchCoreDeviceWorker;
}
--
The operation couldn’t be completed. (OSStatus error -10814.)
Domain: NSOSStatusErrorDomain
Code: -10814
User Info: {
"_LSFunction" = runEvaluator;
"_LSLine" = 1608;
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_isCoreDevice" = 1;
"device_model" = "iPhone12,3";
"device_osBuild" = "17.1.2 (21B101)";
"device_platform" = "com.apple.platform.iphoneos";
"dvt_coredevice_version" = "355.7.6";
"dvt_mobiledevice_version" = "1643.60.2";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 84635;
"operation_errorCode" = 0;
"operation_errorDomain" = IDELaunchCoreDevice;
"operation_errorWorker" = IDELaunchCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 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" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos17.2";
"sdk_osVersion" = "17.2";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 14.2.1 (Build 23C71)
Xcode 15.1 (22502) (Build 15C65)
Timestamp: 2023-12-23T11:42:00+01:00
本地部署到模拟器时不会出现此错误。然而,当我部署到任何类型的 IOS 设备(我的 iPhone、我的 iPad)时,它确实会发生。
很奇怪,因为它两天前才起作用。从那时起,我只对我的代码库进行了很少的更改,并且我还检查了一些以前可以工作的旧提交,但现在它不再工作了。
尝试
设置 > 开发者 > 清除受信任的计算机
并确保您已打开开发者模式。
设置 > 隐私和安全 > 开发者模式 > 切换开发者模式。