我已经将我的几个macminis升级到El Capitan 10.11.2并安装了Xcode 7.1。但iOS模拟器显示出一些问题。比如,Xcode 7.1的默认iOS是9.1,当我从SDK 9.1在iOS模拟器中启动任何设备时,它只是向我显示黑屏。
所以要检查一下,我去了Xcode>首选项和下载的SDK 9.0和8.4。当我从SDK 9.0或8.4切换到任何设备时,它们工作正常。但我不知道它的默认SDK 9.1会发生什么。
我在下面尝试了解决问题的方法。
他们都没有工作。
当我切换到SDK 9.1下的任何设备时,我已经粘贴了一些CoreSimulator.log日志。
CoreSimulator.log
Jan 10 21:45:21 CoreSimulatorService[331] : Error looking up host support port Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=com.apple.CoreSimulator.SimError Code=159 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state} Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process" Jan 10 21:45:21 CoreSimulatorService[331] : Error looking up host support port Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=com.apple.CoreSimulator.SimError Code=159 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state} Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process" Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process" Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process" Jan 10 21:45:21 CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process" Jan 10 21:45:21 com.apple.iphonesimulator[447] : Error looking up host support port Jan 10 21:45:21 com.apple.iphonesimulator[447] : Error looking up host support port Jan 10 21:45:21 com.apple.iphonesimulator[447] : Error looking up host support port
Simulator.log文件
Jan 10 20:56:58 Simulator[381] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 20:56:58 Simulator[381] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 20:59:39 Simulator[416] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 20:59:39 Simulator[416] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:00:21 Simulator[429] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:00:21 Simulator[429] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:02:45 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:02:45 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:14:06 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:14:06 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:45:21 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge Jan 10 21:45:21 Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
答案 0 :(得分:0)
退出xcode并杀死pid并关闭并退出模拟器。 再次午餐xcode并转到窗口 - > divices - >删除所有设备并添加它,它将起作用。