Xcode project not showing list of simulators

2019-01-21 10:25发布

I open my project in Xcode 6.1. When I try to run the project, the button is grayed out. When I try to go to Product > Clean, the option is grayed out. When I look at the list of simulators, all I get is My Mac instead of the usually iOS Device. How do I get my simulators to come back?

28条回答
Ridiculous、
2楼-- · 2019-01-21 10:44

For anyone struggling with this, I tried the mentioned options without success. Turns out all I needed to do was just quit and relaunch Xcode. Simple things can be annoying sometimes.

查看更多
beautiful°
3楼-- · 2019-01-21 10:45

I just needed a good, old fashioned restart the computer. When uninstalling and reinstalling XCode didn't do the job, I restarted out of pure frustration....lo and behold! After a restart, everything was as it should be.

查看更多
ゆ 、 Hurt°
4楼-- · 2019-01-21 10:46

Cmd below solved my problem:

$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

In my case, I upgraded to Xcode 8 and downloaded another version 7.3.1 later (renamed it to "Xcode 7.3.1"), then cannot get the simulator list in Xcode 8.

查看更多
可以哭但决不认输i
5楼-- · 2019-01-21 10:47

In my case i'd accidentally deleted ios devices in system Finder -> Library->Devices->Core simulator

So, the simulators are not listed in the Xcode project except ios device.

I solved this by adding ios simuulators from Xcode->Window->Devices->Add simulators

enter image description here

Hope it'll help someone.

查看更多
干净又极端
6楼-- · 2019-01-21 10:48

I encountered this problem when I update my xcode to 8.2beta (with the app name xcode-beta.app), I found the answer above by Jeremy Huddleston Sequoia and tried to rename xcode-beta.app to xcode.app, it worked. I guess the name should be xcode.app to use the simulators, even if you didn't changed the name by yourself when you download the beta one.

查看更多
混吃等死
7楼-- · 2019-01-21 10:49

If you renamed Xcode.app since first launch, the iOS Simulator becomes unavailable. This is mentioned in the Xcode 6.1 Release Notes:

Renaming Xcode.app after running any of the Xcode tools in that bundle may cause iOS Simulator to be no longer be available. Either rename Xcode.app back to what it was when first launched or restart your Mac. (16646772)

查看更多
登录 后发表回答