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条回答
唯我独甜
2楼-- · 2019-01-21 10:35

Make sure that the project you are trying to run has deployment target equal to or less then the SDK version of your Xcode. In my case I tried to run a project which was built using iOS8.4 but I have Xcode6.1 with SDK version 8.1

I changed the deployment target to 8.1 and it start showing me simulators.

P.S before doing this, make sure that your code and external libraries are compatible with your new deployment target, else you have to update your Xcode.

查看更多
We Are One
3楼-- · 2019-01-21 10:36

Try This, It worked like a charm! for me,

Follow below step

1) Clean Derived Data as show below,

 rm -rf ~/Library/Developer/Xcode/DerivedData/

OR

 Xcode---> Preferences--->Location--->Derived Data

Derived Data

2) In Deployment Info change Deployment Target

It's equal to or less then the SDK version of Xcode

enter image description here

3) Quit Xcode

enter image description here

4) Reopen Xcode you will see list of simulators

enter image description here

Hope this is help for some one.

查看更多
Deceive 欺骗
4楼-- · 2019-01-21 10:37

I had this happen to me after an update to a new Xcode. Running

xcode-select --install

fixed it for me.

查看更多
三岁会撩人
5楼-- · 2019-01-21 10:40

In my case I had created a static library target for tvOS in Xcode 8.3.3, and the tvOS simulator was not showing up in the list. Eventually found out that TARGETED_DEVICE_FAMILY in the Build Settings was set to 1,2 instead of 3. Leaving this here incase anyone else encounters the same problem.

查看更多
放荡不羁爱自由
6楼-- · 2019-01-21 10:44

Check if in the app store under xcode it says GET instead of installed, delete your current version and get the new one

查看更多
SAY GOODBYE
7楼-- · 2019-01-21 10:44

Small but a effective solution. In my case i updated to my xcode to 9.2 version and simulators disappeared.

I found this solution and it worked for me and for others also.

**

Just quit your xcode and restart again. You will have simulators.

**

查看更多
登录 后发表回答