Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Create New iOS simulator on Xcode

I have this fresh installation of Xcode and I'm unable to create new simulators, I press the button to create any new simulator but nothing happens. I'm new on Mac but I have some experience on Linux, so if something need to be changed on terminal I think I can do it if you tell me what.

Create Simulator Screen: Create Simulator Screen

Components Screen: Component Screen

Also I'm having some other bugs, like, every time that I open Simulator I have this message "Unable to Determine Device".

like image 867
chr0m1ng Avatar asked Feb 24 '17 02:02

chr0m1ng


People also ask

How do I enable simulator in Xcode?

Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download.

Can you run iOS simulator without Xcode?

Now with new Xcode if the icon of the Xcode is on dock you can just right click it and form the menu you can select Open Developer Tool and in the sub menu you can select the iOS Simulator to open the simulator without opening the Xcode.!


3 Answers

Try to restart the simulator service:

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
like image 83
Javier Avatar answered Oct 14 '22 03:10

Javier


Can you file a radar and include the output of sudo sysdiagnose -q and xcrun simctl diagnose? That last command might not work if you are on Xcode 8.2, in which case grab ~/Library/Logs/CoreSimulator/**. Also include the output of xcrun simctl list.

You should see some Simulators listed by default. The fact that you don't means there is something wrong with CoreSimulator or with Xcode's connection.

If simctl shows devices with no problems that is one thing. If it shows the default devices as unavailable then that is something entirely different. You can also run Simulator.app directly (Spotlight should find it for you) and see what devices it shows in the menu.

Close Xcode and Console.app. Run xcode-select -p and make sure it matches the location of Xcode, which should be /Applications/Xcode.app. If not, run sudo xcode-select -s <path_to_xcode.app>. Run sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService. Then open Xcode and see if you can see the devices listed.

You might also try reinstalling Xcode if nothing else works. Each version of Xcode ships with a built-in Simulator runtime for each platform. In this case 10.2, meaning you should have a number of iOS 10.2 Simulators pre-created and ready to use.

like image 4
russbishop Avatar answered Oct 14 '22 04:10

russbishop


This is likely because your app's target is set to a version higher than the simulator supports.

For example below:

a. After adding ios simulator 11.2 and adding an iPhone 5s while the app's target is still 12.2, you can see the simulators on lower OS version doesn't show up. Target set higher

Can't find added iPhone 5s

b. After changing target to 11.2

Changed target

Added iPhone 5s now visible Now visible

like image 3
LordKiz Avatar answered Oct 14 '22 05:10

LordKiz