在迁移到XCode 7.1之后,我不能在iOS和tvOS平台上使用游乐场。只有OS能工作。最简单的操场代码生成错误消息:
无法为选定的运行目标找到执行服务
我怀疑这与XCode没有找到合适的模拟器有关,但是我不知道在哪里以及如何配置它。
我在现有的项目中尝试了游乐场,以及刚刚创建了一个从飞溅屏幕。
有什么可能是错的吗?
更新:
检查控制台提供了更多的洞察力,但仍然不清楚如何修复:
24/10/2015 10:16:10,193 lsd[279]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
24/10/2015 10:16:10,212 com.apple.usbmuxd[82]: LOCKDOWN_V2_BONJOUR_SERVICE_NAME is _apple-mobdev2._tcp,8de107c0
24/10/2015 10:16:10,248 Xcode[819]: DeveloperPortal: Using pre-existing current store at URL (file:///Users/courteouselk/Library/Developer/Xcode/DeveloperPortal%207.1.db).
24/10/2015 10:16:10,381 com.apple.CoreSimulator.CoreSimulatorService[461]: Requested phone is is not available for pairing. Assuming it has the capability.
24/10/2015 10:16:10,384 com.apple.CoreSimulator.CoreSimulatorService[461]: Requested phone is is not available for pairing. Assuming it has the capability.
24/10/2015 10:16:12,929 com.apple.usbmuxd[82]: _SendAttachNotification Device 80:ea:96:04:a5:da@fe80::82ea:96ff:fe04:a5da._apple-mobdev2._tcp.local. has already appeared on interface 4. Suppressing duplicate attach notification.
24/10/2015 10:16:13,311 GPUToolsAgent[832]: Mac Agent inited !!!
24/10/2015 10:16:14,287 Xcode[819]: <DYMobileDevice: 0x7ffbfd6b6320>: failed to acquire service transport reservation: Error Domain=DYAMDErrorDomain Code=-402653150 "(null)"
24/10/2015 10:16:14,447 Xcode[819]: [MT] IDEPlaygroundEditor: Error encountered attempting to run playground: Error Domain=IDEPlaygroundErrorDomain Code=1 "Unable to find execution service for selected run destination." UserInfo={NSLocalizedDescription=Unable to find execution service for selected run destination.}
24/10/2015 10:16:19,672 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,672 mdworker[255]: LaunchServices: Database mapping failed with result -10822, retrying
24/10/2015 10:16:19,672 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,673 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,673 mdworker[255]: LaunchServices: Database mapping failed with result -10822, retrying
24/10/2015 10:16:19,673 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,674 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,674 mdworker[255]: LaunchServices: Database mapping failed with result -10822, retrying
24/10/2015 10:16:19,674 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,674 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:19,674 mdworker[255]: LaunchServices: Database mapping failed with result -10822, retrying
24/10/2015 10:16:19,675 mdworker[255]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
24/10/2015 10:16:20,497 Xcode[819]: CompanionProxy: _SocketReadCallback:128 (0x0x700000117000): Failed to receive response from AMDevice 0x7ffbfe60cad0 {UDID = e4bfce5e11be0bcf730ada45b4d6ae81f1abdb01, device ID = 23, FullServiceName = 80:ea:96:04:a5:da@fe80::82ea:96ff:fe04:a5da._apple-mobdev2._tcp.local.}: 0xe8000084
24/10/2015 10:16:20,497 Xcode[819]: CompanionProxy: _SocketReadCallback:200 (0x0x700000117000): Stopped listening for paired devices from AMDevice 0x7ffbfe60cad0 {UDID = e4bfce5e11be0bcf730ada45b4d6ae81f1abdb01, device ID = 23, FullServiceName = 80:ea:96:04:a5:da@fe80::82ea:96ff:fe04:a5da._apple-mobdev2._tcp.local.}: 0xe8000084发布于 2015-10-25 13:21:17
好吧,经过一番挣扎,这是解决办法。
~/Library/Developer/CoreSimulator注意:在我的例子中,将CoreSimulator重命名为CoreSimulator.old,重新启动后自动创建了一个新的CoreSimulator (因此,我丢弃了.old one)。
顺便说一句,这里有一个文件~/Library/Developer/CoreSimulator/Devices/device_set.plist,在/Root/DefaultDevices下面有一个完整的模拟器列表。我认为这就是问题的根源。
发布于 2015-11-01 10:49:35
也许有一个更快的解决办法:
检查Xcode中的设备中是否有iPad Pro模拟器。如果没有-通过添加模拟器选项添加它。
正如一些人在评论中所指出的,您可能还需要重新启动Xcode或重新打开操场。
若要添加模拟器,请转到设备(窗口>设备)。单击窗口左下角的+按钮,单击“添加模拟器”,然后从下拉列表中选择适当的"Device“,然后单击"Create”。
发布于 2016-01-07 21:28:12
我能够用终端中的以下两个命令来解决这个问题:
$ rm -rf ~/Library/Developer/CoreSimulator/Devices
$ killall -9 com.apple.CoreSimulator.CoreSimulatorServicehttps://stackoverflow.com/questions/33311116
复制相似问题