我正在使用Xcode 7.3.1并通过我的设备上的命令行执行XCTest,“iPhone 1”,这是运行iOS 9.3.5的iPhone 6:
xcodebuild \
-scheme Todo \
-project Todo.xcodeproj \
-destination "platform=iOS,name=iPhone 1"\
clean build test
构建成功,但在编译测试文件后失败:
2016-09-13 14:51:32.604 xcodebuild[79689:2064116] DTDeviceKit: Could not start house arrest service for app identifier com.example.Todo [Error Domain=com.apple.dtdevicekit Code=-402653093 "Too many instances of this service are already running." UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x000000010fead3cb DTDKCreateNSError + 113
1 DTDeviceKitBase 0x000000010feadb09 DTDK_AMDErrorToNSError + 791
2 DTDeviceKitBase 0x000000010febf2f5 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 100
3 DTDeviceKitBase 0x000000010febe1d1 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_4 + 22
4 DTDeviceKitBase 0x000000010feb0317 __DTDKExecuteInSession_block_invoke + 38
5 DTDeviceKitBase 0x000000010feaf940 __DTDKExecuteWithConnection_block_invoke_2 + 477
6 DTDeviceKitBase 0x000000010feaf73c __DTDKExecuteWithConnection_block_invoke + 107
7 libdispatch.dylib 0x00007fff99bda40b _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff99bdb9f2 _dispatch_barrier_sync_f_invoke + 74
9 DVTFoundation 0x0000000106400bef DVTDispatchBarrierSync + 206
10 DVTFoundation 0x00000001063dd59b -[DVTDispatchLock performLockedBlock:] + 116
11 DTDeviceKitBase 0x000000010feaf646 DTDKExecuteWithConnection + 223
12 DTDeviceKitBase 0x000000010feb02a1 DTDKExecuteInSession + 121
13 DTDeviceKitBase 0x000000010febe108 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 117
14 DVTFoundation 0x00000001063fff4b __DVTDispatchAsync_block_invoke + 827
15 libdispatch.dylib 0x00007fff99be593d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00007fff99bda40b _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff99becbd7 _dispatch_async_redirect_invoke + 1733
18 libdispatch.dylib 0x00007fff99bda40b _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff99bde29b _dispatch_root_queue_drain + 1890
20 libdispatch.dylib 0x00007fff99bddb00 _dispatch_worker_thread3 + 91
21 libsystem_pthread.dylib 0x00007fff9b5d94de _pthread_wqthread + 1129
22 libsystem_pthread.dylib 0x00007fff9b5d7341 start_wqthread + 13
), NSLocalizedRecoverySuggestion=Too many instances of this service are already running., NSLocalizedDescription=Too many instances of this service are already running.}]
2016-09-13 14:51:32.918 xcodebuild[79689:2063388] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
在Xcode中运行测试也没有成功。它总是因这些帖子中描述的错误而失败:
我已尝试过帖子中建议的解决方案(即修复配置文件和代码签名),但它没有帮助。有没有人遇到类似的问题?
答案 0 :(得分:7)
我试图找出DTDeviceKit
是否在我的机器上运行,但事实并非如此。我的下一个怀疑是,它可以通过电话运行。
重新启动手机后,它可以正常工作。
答案 1 :(得分:1)
我用苹果提交了技术支持票。原来这是一个影响32位设备的错误。因此,如果您在64位设备上进行测试,则不会出现此问题。