Xcode 8 beta simulator fails to run app after accidentally running Xcode8 simulator

一世执手 提交于 2020-01-02 01:08:12

问题


"Failed to initiate service connection to simulator"

Tried to clean app, reinstall it, delete derived data, reset simulator settings, restart xCode. I've also heard other people solved problems with their simulators by recreating the simulator. I tried that as well. When I press create, I get the very same error message: "Error returned in reply: Connection invalid"


回答1:


Even this occurs on Xcode 8.0 stable version.

Got it solved by closing Xcode 7 and its simulator.

It seems that when you are working on Xcode 8 and its simulator then Xcode 7 simulator should not remain open.

Below is screenshot of simulator state for Xcode 7 when you're working on Xcode 8.

If fixes like delete derived-data, reset simulator content doesn't works then restart your system.




回答2:


This happens when you try to run a project inXcode 8 in simulator mode and the Xcode 7's simulator is still running.

You only need to close them all(xcode 8, xcode 8 simulator, xcode 7, xcode 7 simulator) then run xcode 8 again.

It should run properly after that.




回答3:


Running the Simulator (or CoreSimulator service) from multiple versions of Xcode at the same time is not supported.

Be sure you completely close one version of Xcode/Simulator.app before you open a different version.

Also be aware that Console.app on Sierra connects to CoreSimulator to present the simulated device's logs. That can keep a connection to CoreSimulator alive when attempting to switch versions.




回答4:


It seems the problem sorted itself out after I came to work the second day. That means a computer restart fixed it for me



来源:https://stackoverflow.com/questions/39856001/xcode-8-beta-simulator-fails-to-run-app-after-accidentally-running-xcode8-simula

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!