xcode simulator not coming up - reinstall possible?

霸气de小男生 提交于 2019-11-27 15:57:38

问题


I ran out of disk space and had to clean up the folders on my hard disk. After the cleanup, when I run Xcode, the simulator is not coming up. I am not able to select a simulator to run, on Xcode. Most likely I deleted some folder required by simulator, in my cleanup. Xcode runs onto the device correctly. Anybody came across such a situation?

I deleted my Xcode and re-installed, but that did not solve the issue. As I can see, Simulator is a separate application (since we can close simulator without closing the Xcode). Is it possible to re-install Simulator alone? Or any other solution to get back my IOS simulator?

I know this is not a programming question, still hope can be posted here. Thanks in advance.


回答1:


I was able to delete my simulator devices and re-install them by following this excerpt written for a user that was missing their simulator:

Open the Xcode > Open Developer Tool > iOS Simulator menu (if you get a pop up error just dismiss it). Once in the Simulator go to Hardware > Device > Manage Devices. Delete everything listed under simulator. Reboot your machine. After that navigate back to Manage Devices in the simulator and click the plus to add back your simulators. Then the iOS 8 simulators will show up. Hope that also helps you.

Here is where it came from: http://www.reddit.com/r/iOSProgramming/comments/2b9j2p/xcode_6_missing_ios_8_simulator/




回答2:


This will delete all simulator info and get you back to the point where you can use Xcode/Preferences/Components to re-download the simulators and start from scratch:

  1. Quit Xcode, Simulator, Instruments, etc.
  2. Run in Terminal: sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
  3. Run in Terminal: sudo rm -rf ~/Library/*/CoreSimulator

Thanks to Apple Dev Forum response https://forums.developer.apple.com/thread/13718



来源:https://stackoverflow.com/questions/27338042/xcode-simulator-not-coming-up-reinstall-possible

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