Xcode UI测试导致每个iOS设备崩溃

当尝试在物理iOS设备上使用新的
Xcode 7 UI测试功能时,通过在测试方法中按下具有插入符号的记录按钮,Xcode构建项目,但在设备上启动应用程序之前,IDE崩溃.我用不同的项目(甚至是新编写的模板,没有编写一行代码)和不同的设备(iPhone 6s Plus,iPad Pro,iPad mini 2和iPhone 5,都运行iOS 9.2)对此进行了测试.有没有人有同样的问题,已经找到了解决方案?这是完整的崩溃日志:

Process: Xcode [48959]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2 (9548)
Build Info: IDEFrameworks-9548000000000000~7
App Item ID: 497799835
App External ID: 814662604
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [48959]
User ID: 501
Date/Time: 2015-12-16 20:52:24.497 +0100
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Anonymous UUID: DF96274B-998D-3102-7E2F-CECD011B3D38
Sleep/Wake UUID: 613A68D1-4541-4DB7-B1C5-BC255278457F
Time Awake Since Boot: 25000 seconds
Time Since Wake: 19000 seconds
System Integrity Protection: disabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 7C68
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-9548/IDEKit/Testing/IDEUIRecordingManager.m:429
Details: (result) should not be nil.
Object: <IDEUIRecordingManager: 0x7fa128e011a0>
Method: -_workspaceTabController
Thread: <NSThread: 0x7fa119504010>{number = 1, name = main}
Hints: None
Backtrace:
0 0x0000000102f861fa -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 0x0000000101b12761 _DVTAssertionHandler (in DVTFoundation)
2 0x0000000101b12978 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x000000010306456b -[IDEUIRecordingManager _workspaceTabController] (in IDEKit)
4 0x0000000103065433 __94-[IDEUIRecordingManager _startRecordingWithLaunchSession:alwaysAskForAPIAccess:reservedNames:]_block_invoke_2 (in IDEKit)
5 0x0000000101b4ea04 __DVTDispatchAsync_block_invoke (in DVTFoundation)
6 0x00007fff9545c871 _dispatch_call_block_and_release (in libdispatch.dylib)
7 0x00007fff9545133f _dispatch_client_callout (in libdispatch.dylib)
8 0x00007fff95464c1d _dispatch_main_queue_callback_4CF (in libdispatch.dylib)
9 0x00007fff8b1d0cd9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation)
10 0x00007fff8b18bd3d __CFRunLoopRun (in CoreFoundation)
11 0x00007fff8b18b338 CFRunLoopRunSpecific (in CoreFoundation)
12 0x00007fff846ce935 RunCurrentEventLoopInMode (in HIToolbox)
13 0x00007fff846ce76f ReceiveNextEventCommon (in HIToolbox)
14 0x00007fff846ce5af _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
15 0x00007fff899610ee _DPSNextEvent (in AppKit)
16 0x00007fff89d2d943 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
17 0x00000001020ef0c2 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
18 0x00007fff89956fc8 -[NSApplication run] (in AppKit)
19 0x00007fff898d9520 NSApplicationMain (in AppKit)
20 0x00007fff8589a5ad start (in libdyld.dylib)
abort() called
HandleCommand(command = "process plugin packet send 'QSetEnableAsyncProfiling;enable:0;'")

最佳答案 我遇到了同样的问题.我甚至尝试清理缓存(rm -r~ / Library / Developer / Xcode / DerivedData),但没有成功.

我找到了解决方法:

>开始在您选择的设备中运行应用程序(Command-R)
>一旦应用程序准备好并在设备中运行,请点击调试工具栏中的红色“记录UI测试”按钮.

希望这适合你.

编辑.更奇怪的是,这适用于物理连接到我的计算机的iPhone 6以及在模拟器中运行的iPhone 5s.尝试在iPhone 6 Plus上记录UI测试并不成功.

点赞