iPhone simulator not visible in Xcode - ios

I recently updated my Xcode from 9.2 to 9.3. But unfortunately, all iPhone simulators are no longer visible.
How do I solve this problem?

You have to delete Derived Data.
In Xcode, go to Preferences > Locations > Derived Data : click the little arrow to open the derived data path in Finder. Delete the DerivedData folder.
Restart Xcode.
It should work.

Also remember to check the architectures, they must match the type of device, for example, if you only have arm64 selected nothing will appear, you must select armv7, or both.

All way above not working for me. It's took for 3 days, finally I found exactly way to fix this error. Because iOS Deployment Target under build settings is higher than list simulator. I was using Xcode 12 while the deployment target was set to iOS 14.5. I got the list of simulators as soon as I set it to iOS 14.4. So you just need to downgrade IOS version smaller than IOS version in simulator.

Also you have two options as shown in your screenshot.
Add additional simulators
Download simulators
Try them out

I have another solution, You can also perform these steps, to resolve this problem:
Step 1: Select Preferences... from menu
Step 2: Select locations from top tab
Step 3: select xcode which you use.
If Simulator doesn't show after this process then Quit XCode and then reopen again.

Lowering down the deployment target in the build settings did the trick for me.

Related

Xcode 9.0 simulators "disappeared"

I recently installed Xcode 9.0 GM on my machine. I fired it up to play around and the only simulators I see in the scheme are iPhone 8, iPHone 8 Plus, and iPhone X. I clicked "Download Additional Simulators" thinking the solution would lie there.
I'm greeted with this screen, which is everything I previously had installed.
I dug around on the Apple Developer forum and found this post discussing a similar problem with a prior version of iOS. At the suggestion of one of the posters, I powered down my machine and booted it cold. I opened up Xcode 9.0 again and I have the same issue.
Any suggestions what I can get additional hardware to appear in my Xcode scheme? Thank you for reading.
In Xcode 10.3, I also lost all simulators but got them back by running
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
In case anyone else gets here and are in my situation, I just upgraded to Xcode 9.2 and the simulators were all missing, but quitting and relaunching Xcode restored them.
For me quitting and relaunching Xcode also didn't help. So I did the following 3 steps.
Three steps
Step 1:
Product -> Destination -> Download Simulators... Download the simulator(s) you need
Step 2:
Sometimes when you download the new simulator types, they don't automatically show in the list of possible simulators.
Product -> Destination -> Add Additional Simulators... Click the + button in the lower left hand corner, then Add Simulator Give it a name, device type, and the iOS version you just downloaded.
Step 3:
Set proper deployment target. If you have downloaded simulators of lower versions, set the deployment target to the same.
Now it should show up in your list of simulator devices!
Delete every single one of the simulators listed in the Devices and Simulators window, one by one, and then start over make new simulators. That always works for me. It's a good idea after any upgrade, in fact.
My question was originally answered, but I found a more efficient way to do it with fastlane. Within fastlane, there's a tool called snapshot. The usage is as follows from terminal:
fastlane snapshot reset_simulators
Warning: This will delete all your simulators and replace by new ones! This is useful, if you run into weird problems when running snapshot.

Xcode 9 doesn't have any simulator device

I just downloaded xcode 9 beta, but there is no simulator within it. Try to add new simulator but the create button doesn't work. Please help
By "no simulator within it" I mean there is option to build with simulator.
See
.
Also, the create button doesn't work
Go to Xcode Preferences -> Locations and go to the Derived Data location in Finder:
Just remove all contents from it, then right click on Xcode icon and quit it, and reopen it:
It is a simulator but you need to close Xcode 8 if you have it open and restart Xcode 9 beta.
This may happen due to multiple Xcode installed on machine or might be the deployment target is higher than the simulator OS version.
In order to resolve this navigate to following location :
Xcode > Preference > location > comindline Tool > change the xcode version
and decrease the deployment target.
You may have removed iOS Simulators when you cleaned up disk space. I think I may have used DaisyDisk to remove files when I ran out of space.
You can re-add simulators using the Devices & Simulators window. (Shift + Command + 2)
Delete the derived data, close all your running Xcodes and restart your computer. It just helped me.
Apart from the simulators not showing, my project's storyboard was messed up also after upgrading to XCode 9. I simply restarted XCode and voila! Did not have to delete derived files - though it would probably not hurt.
You can do the same that #badhan-ganesh suggests (cleaning derived data) using the Xcode keyboard shortcut to clean derived data:
shift+alt+cmd+k
If needed, you can clean the project using Xcode keyboard shortcut:
shift+cmd+k
After that, restart Xcode and simulators should be available again.
Having a higher deployment target than what is installed on your simualtors also causes this.
Ensure your Deployment Target version in Build Settings is also set to the desired version (and that you have that version of the respective simulator installed). Suppose, if that were set to 10.3 and I didn’t have an iOS 10.3 simulator installed, I wouldn’t be able to see any simulators. But because it’s set to 10.1, and I have 10.1 simulators installed, I can see them.
When my xcode updated to 9.4 I face the same problem at first time. After force quit and start again solve the problem for me.
If you upgraded Xcode then follow the steps
Delete derived data, Xcode-> Preferences -> Locations and select arrow symbol just before Advance button -> select all files and delete.
Quit Xcode
Quit Xcode from Dock
Open Xcode again.
:-)
Hope this will help you.
I have Xcode 8.3 and Xcode 9.1, I came to this post to find a solution to missing simulators after forced upgrade to 9.1...
I was about to do the suggestion to remove the entire DerivedData directory, lucky closing Xcode 9.1 and restarting it worked. Moreover, I had to close all simulator(s).
I had to rebuild app apps on simulator again.

Can't select iOS simulator in Xcode

I updated Xcode to the 6.1 version and now I don't understand why I can't select the simulator in the top left corner like in the previous version when I want to run my application. The only choice that appear is a general "iOS device".
Press "Window" and then "Devices", check if they appear there and if not - click the "+" icon in the lower left
Go to File -> Project Settings -> Info.
Change the deployment target to a lower or higher version.
Most probably you do not have a simulator installed for the current deployment target. You can do so by going to Xcode Preferences -> Downloads. In the Components section, you will see the options for downloading the simulators you already don't have.
Faced the same issue many times and found this solution. Hope this helps. :)
I finally found the solution. When I added a simulator in the devices menu (Shift+Cmd+2) I got this error: "Unable to determine SimDeviceSet, set_path=/Users/MyUser/Library/Developer/CoreSimulator/Devices"
I checked the directory and there was not the folder "CoreSimulator", so I created it. I restarted XCode and now there are all the iOS Simulators selectable for running my app.
Thank you all.
I suspect that you are having issues communicating with CoreSimualtorService due to renaming Xcode.app or similar. This is mentioned in the Xcode 6.0 and 6.1 release notes. Unfortunately, the only workaround at the moment is for you to rename it back or reboot.
Update:
Note that for current (as of this update) versions of Xcode (7.2+), renaming should work ok. For best results, only use one version of Xcode at a time. If you start another version of Xcode while one is running, the previous one will loose access to simulator devices. Restarting it will cause it to have access to the simulator devices (and of course the other one to stop). Basically, the last one wins.
I experienced same issue.My OS is 10.9.5. I solved this issue by downloading IOS simulator 7.1 from Xcode Preferences -> Downloads -> iOS 7.1 Simulator.
And then Windows -> Devices -> added simulator devices by clicking +.
Thanks.
Go to Window -> Devices and Simulators, check whether there is any Simulator listed. If no, add by clicking over "-" over the lower left corner. Or if devices are there but you are not able to see them in devices to be choose from, then check for deployment target that might not be compatible with Xcode simulators, set target according to your Xcode support and you will see the simulators list.
in my case, after delete xcuserdata from my folder, then simulate only have my mac without any other options. after search, I found in scheme setting, Run->Info->Executable without any app. Then I select my app in the project. then simulator all come back.

How to run old simulators in Xcode 5 [duplicate]

Xcode 5 is behaving just fine, and I'm able to build and run apps on my iOS 7 device and in the iOS 7 simulator.
However, I do want to support iOS 6.1, but I don't see any way to build and run the apps for an iOS 6 simulator.
Things wot I've done:
Set Deployment Target to 6.1 for both Project and Target
Downloaded iOS 6 Simulator
Copied the iOS 6 SDK into Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Reset Content and Settings for the simulator
Originally, I was trying to see the app in the iOS 6 simulator by switching from iOS 7 to iOS 6 in the Hardware > Device menu in the iOS Simulator application, but there aren't any apps in the iOS 6 simulator.
I'm gathering from answers like this one that there should be something I can select before I click Build/Run.
I'd love to be able to see my apps in both iOS 6 and 7 simulators. Any ideas what I'm missing? Here's a LINK to what I see when I click on the simulator dropdown.
Turns out the solution was changing the deployment target for the project from iOS 6.1 to iOS 6.0, upon which the simulator scheme selection immediately showed the option to choose iOS 6 or 7 simulators. Basically the deployment target should match a simulator version that you have installed.
Thanks to random commenters in questions like this one who mentioned that that worked for them.
All you have to do is go to Xcode -> Preferences -> Choose the "Downloads" tab and install the iOS 6.0 Simulator.
Once you're done downloading it, it should show up as an option in your schemes.
Just a little caveat....I tried what you said but it didn't work for me...
Changed Deployment Target on "Project" from 7.1 to 6.0
Then I realised that Deployment Target was still set to 7.1 on the "Target" - once I changed that it worked!
Click to target or project > Build Settings > Achitecture > Supported Plateforms : change to iOS
What I did to get mine working was click on the scheme to the left of where the Simulators usually appear in the dropdown, then choose edit scheme.
A new window will display, make sure that Run is highlighted on the left and then click on the Info tab. Choose the .app file for Executable.
If you are still looking for a solution here's what worked for me:
From the xcode beta's pull down menus, Xcode > Open Developer Tool >
iOS Simulator (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.
This might help u out better..you have to copy paste iPhoneOS6.1sdk folder. This is for SDK, similarly instead of iPhoneOS.platform select iPhoneSimulator.platform and then the same path.
Please check whether your "Deployment Target" is higher than the ones available on your simulators.
Xcode5 neither has 6.0 SDK or 6.0 simulator. But what you can do is u can copy both 6.0SDK and 6.0 simulator from your previous Xcodes (xcode4.5 for 6.0 and XCode4.6 for ios6.1) You can find the simulator at /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/applications/iphone simulator.app
And SDK at /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0
Copy the entire folders for simulator and SDK in the exact same path of XCode5.
Note: to go the the Contents of Xcode.app just do a right click on the .app file and you will get an option"Show Contents".
Once u are done copy pasting, restart ur XCode5 and u can see 6.0/6.1 simulator as an option :)
Click on your project root.
Then Go to the Build settings.
Then set iOS deployment target 5.0
Then select iphone6 on top left of your project.
See this image
Solved restoring an older version of the xcodeproj file.

Xcode 5 not showing Scheme option to run Simulator on iOS 6

Xcode 5 is behaving just fine, and I'm able to build and run apps on my iOS 7 device and in the iOS 7 simulator.
However, I do want to support iOS 6.1, but I don't see any way to build and run the apps for an iOS 6 simulator.
Things wot I've done:
Set Deployment Target to 6.1 for both Project and Target
Downloaded iOS 6 Simulator
Copied the iOS 6 SDK into Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Reset Content and Settings for the simulator
Originally, I was trying to see the app in the iOS 6 simulator by switching from iOS 7 to iOS 6 in the Hardware > Device menu in the iOS Simulator application, but there aren't any apps in the iOS 6 simulator.
I'm gathering from answers like this one that there should be something I can select before I click Build/Run.
I'd love to be able to see my apps in both iOS 6 and 7 simulators. Any ideas what I'm missing? Here's a LINK to what I see when I click on the simulator dropdown.
Turns out the solution was changing the deployment target for the project from iOS 6.1 to iOS 6.0, upon which the simulator scheme selection immediately showed the option to choose iOS 6 or 7 simulators. Basically the deployment target should match a simulator version that you have installed.
Thanks to random commenters in questions like this one who mentioned that that worked for them.
All you have to do is go to Xcode -> Preferences -> Choose the "Downloads" tab and install the iOS 6.0 Simulator.
Once you're done downloading it, it should show up as an option in your schemes.
Just a little caveat....I tried what you said but it didn't work for me...
Changed Deployment Target on "Project" from 7.1 to 6.0
Then I realised that Deployment Target was still set to 7.1 on the "Target" - once I changed that it worked!
Click to target or project > Build Settings > Achitecture > Supported Plateforms : change to iOS
What I did to get mine working was click on the scheme to the left of where the Simulators usually appear in the dropdown, then choose edit scheme.
A new window will display, make sure that Run is highlighted on the left and then click on the Info tab. Choose the .app file for Executable.
If you are still looking for a solution here's what worked for me:
From the xcode beta's pull down menus, Xcode > Open Developer Tool >
iOS Simulator (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.
This might help u out better..you have to copy paste iPhoneOS6.1sdk folder. This is for SDK, similarly instead of iPhoneOS.platform select iPhoneSimulator.platform and then the same path.
Please check whether your "Deployment Target" is higher than the ones available on your simulators.
Xcode5 neither has 6.0 SDK or 6.0 simulator. But what you can do is u can copy both 6.0SDK and 6.0 simulator from your previous Xcodes (xcode4.5 for 6.0 and XCode4.6 for ios6.1) You can find the simulator at /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/applications/iphone simulator.app
And SDK at /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0
Copy the entire folders for simulator and SDK in the exact same path of XCode5.
Note: to go the the Contents of Xcode.app just do a right click on the .app file and you will get an option"Show Contents".
Once u are done copy pasting, restart ur XCode5 and u can see 6.0/6.1 simulator as an option :)
Click on your project root.
Then Go to the Build settings.
Then set iOS deployment target 5.0
Then select iphone6 on top left of your project.
See this image
Solved restoring an older version of the xcodeproj file.

Resources