Xcode 8.0 Simulator broken

2019-03-04 14:27发布

Something has gone wrong with my Xcode install... I was running my app and seeing odd behaviour within the app itself, for starters I wasn't able to run the build in the simulator.. it'd install and never launch, eventually putting up a dialogue box about being unable to bless the connection to the simulator. I'd had this problem a few days before but it eventually went away, googling just revealed people having issues with the beta builds or beta MacOSX.

Eventually today I rebooted my Mac and having done so, launching Xcode gave me some other error about the simulator, which I didn't properly take notice of. Since then my project no longer lists any simulators to deploy with, if i try to add new simulators the button to add the simulator does nothing and I have to cancel the dialogue box. If I try and run the simulator or watch simulator directly it just beach balls indefinitely and i have to force kill it.

I've created a new user account and within that made a new Xcode project, which also has no simulators.

I've got a zipped backup of my Xcode from before this problem occurred which I've extracted and swapped in place and it makes no difference.

I guess I could do with redownloading the app off the AppStore in hope that the installer would do something to fix this problem.

Anyone got any thoughts on other things I can try?!

Cheers

1条回答
The star\"
2楼-- · 2019-03-04 15:08

What is most likely to be the case is that your XCode installation is corrupt. The best thing to do is to delete Xcode entirely and also these directories and files:

  • ~/Library/Caches/com.apple.dt.*
  • ~/Library/Caches/xctest
  • ~/Library/Containers/com.apple.dt.*
  • ~/Library/Developer
  • ~/Library/MobileDevice
  • ~/Library/Preferences/com.apple.dt.*
  • ~/Library/SavedState/com.apple.dt.*

Then reboot your system and reinstall Xcode. Hopefully that should have cleared out the issue.

查看更多
登录 后发表回答