macOS High Sierraにアップグレードした後、端末からxcodebuild
を実行するとこのエラーが発生します。iPhoneConnect:##開発者のディスクイメージをマウントできません。エラードメイン= com.apple.dtdevicekitコード= -402652958
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
);
}
コードビルドとテストが合格です。
はい、ロックされたデバイスでこのエラーが発生しました。しかし、この場合、オペレーティングシステムをアップグレードした直後であり、シミュレータでエラーが発生していました。 Xcodeからテストを実行すると、シミュレータは「ロック解除」されました。 –