iPhoneConnect:##无法挂载开发人员磁盘映像,Error Domain = com.apple.dtdevicekit Code = -402652958

时间:2017-09-26 17:23:29

标签: xcode xcodebuild macos-high-sierra

升级到macOS High Sierra后,我从终端运行xcodebuild时收到此错误。

2017-09-26 10:11:03.990 xcodebuild[1333:141317]  iPhoneConnect: ## Unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=-402652958 "Development cannot be enabled while your device is locked." UserInfo={NSLocalizedDescription=Development cannot be enabled while your device is locked., com.apple.dtdevicekit.stacktrace=(
    0   DTDeviceKitBase                     0x0000000116c26a0d DTDKCreateNSError + 113
    1   DTDeviceKitBase                     0x0000000116c27251 DTDK_AMDErrorToNSError + 1135
    2   DTDeviceKitBase                     0x0000000116c681b7 -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 782
    3   DTDeviceKitBase                     0x0000000116c68a6e -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 488
    4   IDEiOSSupportCore                   0x0000000116b4c495 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133
    5   DVTFoundation                       0x000000010ada60eb __DVTDispatchGroupAsync_block_invoke + 806
    6   libdispatch.dylib                   0x00007fff54d447a2 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x00007fff54d3cf64 _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00007fff54d50110 _dispatch_continuation_pop + 599
    9   libdispatch.dylib                   0x00007fff54d478e0 _dispatch_async_redirect_invoke + 703
    10  libdispatch.dylib                   0x00007fff54d3eb56 _dispatch_root_queue_drain + 515
    11  libdispatch.dylib                   0x00007fff54d3e902 _dispatch_worker_thread3 + 101
    12  libsystem_pthread.dylib             0x00007fff550001ca _pthread_wqthread + 1387
    13  libsystem_pthread.dylib             0x00007fff54fffc4d start_wqthread + 13
), NSLocalizedRecoverySuggestion=Please unlock your device and reattach. (0xE80000E2)., NSLocalizedFailureReason=Please unlock your device and reattach. (0xE80000E2).}) {
    NSLocalizedDescription = "Development cannot be enabled while your device is locked.";
    NSLocalizedFailureReason = "Please unlock your device and reattach. (0xE80000E2).";
    NSLocalizedRecoverySuggestion = "Please unlock your device and reattach. (0xE80000E2).";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x0000000116c26a0d DTDKCreateNSError + 113
    1   DTDeviceKitBase                     0x0000000116c27251 DTDK_AMDErrorToNSError + 1135
    2   DTDeviceKitBase                     0x0000000116c681b7 -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 782
    3   DTDeviceKitBase                     0x0000000116c68a6e -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 488
    4   IDEiOSSupportCore                   0x0000000116b4c495 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133
    5   DVTFoundation                       0x000000010ada60eb __DVTDispatchGroupAsync_block_invoke + 806
    6   libdispatch.dylib                   0x00007fff54d447a2 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x00007fff54d3cf64 _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00007fff54d50110 _dispatch_continuation_pop + 599
    9   libdispatch.dylib                   0x00007fff54d478e0 _dispatch_async_redirect_invoke + 703
    10  libdispatch.dylib                   0x00007fff54d3eb56 _dispatch_root_queue_drain + 515
    11  libdispatch.dylib                   0x00007fff54d3e902 _dispatch_worker_thread3 + 101
    12  libsystem_pthread.dylib             0x00007fff550001ca _pthread_wqthread + 1387
    13  libsystem_pthread.dylib             0x00007fff54fffc4d start_wqthread + 13
);
}

代码构建和测试通过。

3 个答案:

答案 0 :(得分:3)

似乎在所有平台上从Xcode运行测试“解锁”模拟器,并且从命令行运行xcodebuild时不再出现错误。

答案 1 :(得分:0)

我遇到了同样的问题,错误日志清楚地标明了问题,这是一个锁定的iOS设备。当设备处于活动状态并解锁时运行编译时,不会发生错误。

答案 2 :(得分:0)

我的问题是这个。 经过大量搜索而没有找到解决方案之后,我碰巧找到了适合自己的情况的

但是,在我对单个屏幕应用程序的发布和很少的组件工作感兴趣之前,即在相同的环境以及移动和macOS中,一个完整的应用程序无法发布,简单就可以了。

不好意思,但是在“ RemotePath”末尾缺少“ /”是我的问题。

错误-> RemotePath =启动/文档

确定-> RemotePath =启动/文档/

我没有其他问题了。