Xcode 9 - 测试目标X遇到错误(无法连接到测试管理器)

use*_*597 14 xcode unit-testing swift

我正在尝试运行一些单元测试,但它一直给我错误:

Showing Recent Issues
Test target X encountered an error (Unable to connect to test manager on d7306c4130298fbc17bc0985ec02f808dcdc1374 If you believe this error represents a bug, please attach the log file at /var/folders/2h/0y4yjs6s7l307mbr6pk1xdl00000gn/T/com.apple.dt.XCTest/IDETestRunSession-CF80FA05-C8ED-4FCE-A04B-4A8070F21059/X-E8F39B10-0CDC-43D5-9BED-CD2D0F6081DA/Session-X-2018-01-08_161733-D3YlRc.log)
Run Code Online (Sandbox Code Playgroud)

我试过搜索这种类型的错误但无济于事.有人有任何想法吗?

fra*_*iga 16

只需重新启动设备就可以解决这个问题(iOS 11.3)


Mic*_*upo 9

我通过重新启动设备解决了这个问题.对于我的iPhone 8,我按照macrumors.com上的这些说明操作: 硬重启iPhone 8

或者,如果您是libimobiledevice用户,则可以/usr/local/bin/idevicediagnostics restart从mac终端使用.

希望这可以帮助


小智 6

我以正常方式重启我的iPhone 6(iOS 11.2.6)以解决同样的问题.