Xcode 9 doesn't have any simulator device - ios

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.

Related

iPhone simulator not visible in Xcode

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.

iOS Simulators missing when deployment target set to 8.3

I'm still new to Xcode, but I've recently run into an issue that has me stumped. As best as I can tell, right after I updated to 10.10.3, and to Xcode 6.3, any new projects I create don't have an iOS Simulators available. If I change the Deployment Target back to 8.2 (from 8.3), they are once again available. But as long as I leave it set to a deployment target of 8.3, I can only see "iOS Device" and no iOS Simulators are listed.
I've tried deleting and reinstalling Xcode, but I'm still ending up with the same results. Anyone else having this issue, and or know of a fix for this?
I had a similar problem as the original poster (Bill Matthews). On my MacPro (Early 09), but not my MacBookAir - both running 10.10.3 and newly installed Xcode 8.3 (over the beta 3 version) - I could not get any simulators to show up, irrespective of the iOS build target. (The temporary workaround was debugging on a real device, after selecting it from the "Product" menu -> "Destination"->"Ineligible Devices"->{my iPhone}.)
I tried deleting the simulators in ~/Library/Developer, but could not reinstall them; the Preferences->Downloads->Components would show them as installed/checked off, even after reboot, despite being deleted. Same result even after deleting the components folder and ~/Library/Caches/com.apple.dt.Xcode/Downloads and reboot. Same result even after deleting all of ~/Library/Developer, unlike Bill Matthews (Mazel Tov!).
In an abundance of caution, I reinstalled 10.10.3 from the combo updater (not AppStore), then Xcode 8.3 from developer.apple.com (not AppStore).
That did the trick for me. YMMV.
I actually had the same problem. If you are using fastlane the easiest way is to use the following command.
fastlane snapshot reset_simulators
I was able to see the latest simulators afterwards.

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.

unable to boot the ios simulator XCode 6 iOS 8 [duplicate]

I cannot launch the simulator successfully. Once I launch the IOS Simulator this error appears:
"Unable to boot the IOS Simulator."
Following the IOS Simulator error, I then get an error from Xcode reading:
Unable to run app in Simulator
An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
UPDATE:
This might sound silly but I went to Xcode/preference/Downloads with intentions of seeing a IOS 8.0 Simulator but there was none. Could this be the problem? Am I suppose to have a IOS 8.0 Simulator? If so can someone direct me how to get it? Also, under the "Downloads" tab in Xcode preference I do see IOS 7.0 and 7.1 Simulators and both work fine with Xcode 5.
the trick is, to select the right command line tools!
just select it here
reboot(!) and everything is fine again :-)
Ok It's known problem. Do you see simulators list? If not
Goto Xcode Menu -> Open Developer Tool -> It will open a simulator in your Dock -> click on simulator then go to Simulator Menu: Hardware -> Device -> Manage Devices. Add needed simulators. Always try to run your app with different simulators.someone will work.
Restart your Mac. I just had that exact error after installing Xcode 6 beta 7, literally the only thing I did in response was reboot my Mac and now the iOS 8 simulator is working.
This error is common if you update Xcode without restarting afterwards.
In my case, i reset ios simulator settings fix it.
iOS Simulator -> Reset Content and Settings ...
Open Xcode 6 beta
Goto Window > Devices
Click on the little + sign at the bottom
Add (if missing) all the devices that you want, or delete and recreate if not working.
If anyone of the simulator is not working then you can delete it and then re-create it again in this menu.
I saw the same issue when I installed Xcode 6 beta 6, and deleted beta 4 and beta 5. Apparently, deleting the old betas also deleted the iOS Simulator 8 versions! Putting it back from my Trash solved the issue.
Solution: Don't delete old beta software!
Edit: #Flori's solution worked. Was able to delete the old beta software, and after a complete system reboot, it worked again.
From the xCode 6 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.
Just unset DYLD_INSERT_LIBRARIES environment variable in the /etc/launchd.conf or ~/.launchd.conf file. Which you can edit by sudo vi /etc/launchd.conf command. remove the above flag save it by "ZZ" (captial Z) and reboot the system. It works like a charm.
Make sure that path in menu XCode>Preference>Locations point to XCode 6.0 (Restart Xcode after changing them). Then go to menu Window>Devices and add simulator devices you want to use.
Edit: Turns out I was getting my version of the error because I had a file (the "Empty File" type) named "Frameworks" in several of my projects, and this was causing big issues with the iOS 8 simulators. Renaming the file to be anything else, and then doing a Clean Build Folder fixed it right away.
------Deprecated Original Message Below--------
In case this helps anyone -- I was having a similar error on Xcode 6 GM, and tried everything mentioned in these Answers, but the iOS 8 simulators would never run any of my apps (no problems with iOS 7 running from Xcode 6 though).
What did sort of work was creating a new project (new project apps would run in the iOS 8 simulators, but never any luck with existing apps). Copying over files and project settings is no fun, but at least it let me do testing and see if my apps needed fixing for the iOS 8 public release.
Extended description of problem at https://devforums.apple.com/thread/246751
I tried everything mentioned above and nothing worked.
Finally the only way to make it work was unsetting DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib
How I did this:
Open terminal and typing "sudo vi /etc/launchd.conf"
Changing
"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
to
"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
Save changes
Reboot your system
In this post [1] explain what DYLD_INSERT_LIBRARIES is for
[1] https://stackoverflow.com/a/26053165/2091181
I got this issue when moving from Beta 6 to Beta 7. Very frustrating. I could reset content and settings on any of the iOS 8 simulators. None of my iOS 8 simulators were working at all, just a black screen. I restarted my machine during the process, but I am not sure if it did anything. Initially I had only iOS 8 Simulators. I had to remove and reinstall Xcode6Beta7. I did not get the Install More Components the first time I installed it, I am not sure if that was the missing part. I installed the iOS 7 Simulators from Settings->Downloads because my iOS8 ones were not working. After I had reinstalled and relaunched the simulator, I then had a list of iOS 6,7,& 8 simulators. None of the iOS 8 Simulators were working. I was able to launch the iOS7 simulator and then using the device menu change to an iOS 8 Simulator. Some still did not work, I had to remove them and re-add them in the devices screen.
Remove XCode6Beta from Applications.
Restart Machine (Just in case, this seems to solve some peoples issue completely)
Install XCode6Beta.
Verify the Install Additional Components ran.
Launch Xcode6Beta.
Preferences->General->Change Command Line Tools to Xcode 6.0.
Restart Xcode.
Preferences->Downloads->Download iOS 7 Simulator (If not already downloaded).
Run App on iOS 7 Simulator (Or launch iOS Simulator and switch to iOS 7 device)
If the iOS 7 Simulator is working, Hardware->Devices->Select an iOS 8 simulator.
Delete and recreate any non working iOS 8 Simulators in Window->Devices from Xcode.
I wrestled with this for a bit, with the simulator app reporting that it couldn't find the iOS8 simulator, and suggesting updating in Prefs/Downloads, which didn't work. I tried re-installing Beta 6 twice (without removing all the support files, which would have been next). The initial installation described itself as build 6A280c; a fresh download yielded build 6A280e. No luck.
Eventually, I opened Window -> Devices, and used the "+" button in the lower left to add a new simulator for iPhone 5s, iOS 8, naming it "Fresh 5s". The Schemes popup now displayed three iPhone 5S/iOS 8 options (none with the name I designated, but differentiated by UUIDs); at least one of them worked.
I'm guessing that this feature (collections of arbitrary simulator instances) will be very useful when it's baked. In the meantime, I guess I'll need to manage the list of simulators manually.
Do following steps worked for me:
1. Launch the iOS Simulator and go to iOS Simulator --> Reset Content and Settings...
2. Close all the applications and restart your mac
3. Open Xcode6.0.1 or 6.0 and test the iOS Simulator
Had the same problem after moving from Xcode 6 beta 5 to beta 6, but also for the iOS 7.1 simulator. Restarting my machine seemed to do the job. I did not need to update from Xcode 5.1.1 CLT to Xcode 6.0 CLT.
I tried all of the solutions above, and was still unable to launch the iOS8 Simulator. The iOS7 Simulators all launched fine.
Looking at the Console, I found that the launch was crashing, and the crash log complained about the dynamic library, libimckit.dylib. You can read about that here:
https://discussions.apple.com/thread/5781366?start=0&tstart=0
The quick solution, remove that and its partner library, reboot, and it loads.
Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log?
The "Unable to boot the iOS Simulator." error message is almost always because launchd_crashed because DYLD_INSERT_LIBRARIES was set to something not compatible with the iOS Simulator runtime. Do you have any crash logs (eg: launchd_sim crashes) in ~/Library/Logs/DiagnosticReports? If so, check if they show DYLD_INSERT_LIBRARIES being set. If that's the case, your options are to either update to an OS X Yosemite host (which will deal with this issue) or unset DYLD_INSERT_LIBRARIES (likely set in /etc/launchd.conf or ~/.launchd.conf)
Force Quit All the apps including xcode and simulator
Restart MAC
Checking in the "Locations" Xcode preference, I had two items of the same version, one located in the app translocation area (/var/.../AppTranslocation/...). Also I had previously done a manual command line tools install. To resolve this in the end I had to delete /Applications/Xcode.app and remove the manual command line tools install:
sudo rm -rf /Library/Developer/CommandLineTools
Then installed Xcode anew, and rebooted. Boom! Simulator working again.
Reboot your mac os. its working correctly on xcode 11.3.x and mac os 10.14.6.

Xcode beta 6 iOS 8: Simulator not working

I cannot launch the simulator successfully. Once I launch the IOS Simulator this error appears:
"Unable to boot the IOS Simulator."
Following the IOS Simulator error, I then get an error from Xcode reading:
Unable to run app in Simulator
An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
UPDATE:
This might sound silly but I went to Xcode/preference/Downloads with intentions of seeing a IOS 8.0 Simulator but there was none. Could this be the problem? Am I suppose to have a IOS 8.0 Simulator? If so can someone direct me how to get it? Also, under the "Downloads" tab in Xcode preference I do see IOS 7.0 and 7.1 Simulators and both work fine with Xcode 5.
the trick is, to select the right command line tools!
just select it here
reboot(!) and everything is fine again :-)
Ok It's known problem. Do you see simulators list? If not
Goto Xcode Menu -> Open Developer Tool -> It will open a simulator in your Dock -> click on simulator then go to Simulator Menu: Hardware -> Device -> Manage Devices. Add needed simulators. Always try to run your app with different simulators.someone will work.
Restart your Mac. I just had that exact error after installing Xcode 6 beta 7, literally the only thing I did in response was reboot my Mac and now the iOS 8 simulator is working.
This error is common if you update Xcode without restarting afterwards.
In my case, i reset ios simulator settings fix it.
iOS Simulator -> Reset Content and Settings ...
Open Xcode 6 beta
Goto Window > Devices
Click on the little + sign at the bottom
Add (if missing) all the devices that you want, or delete and recreate if not working.
If anyone of the simulator is not working then you can delete it and then re-create it again in this menu.
I saw the same issue when I installed Xcode 6 beta 6, and deleted beta 4 and beta 5. Apparently, deleting the old betas also deleted the iOS Simulator 8 versions! Putting it back from my Trash solved the issue.
Solution: Don't delete old beta software!
Edit: #Flori's solution worked. Was able to delete the old beta software, and after a complete system reboot, it worked again.
From the xCode 6 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.
Just unset DYLD_INSERT_LIBRARIES environment variable in the /etc/launchd.conf or ~/.launchd.conf file. Which you can edit by sudo vi /etc/launchd.conf command. remove the above flag save it by "ZZ" (captial Z) and reboot the system. It works like a charm.
Make sure that path in menu XCode>Preference>Locations point to XCode 6.0 (Restart Xcode after changing them). Then go to menu Window>Devices and add simulator devices you want to use.
Edit: Turns out I was getting my version of the error because I had a file (the "Empty File" type) named "Frameworks" in several of my projects, and this was causing big issues with the iOS 8 simulators. Renaming the file to be anything else, and then doing a Clean Build Folder fixed it right away.
------Deprecated Original Message Below--------
In case this helps anyone -- I was having a similar error on Xcode 6 GM, and tried everything mentioned in these Answers, but the iOS 8 simulators would never run any of my apps (no problems with iOS 7 running from Xcode 6 though).
What did sort of work was creating a new project (new project apps would run in the iOS 8 simulators, but never any luck with existing apps). Copying over files and project settings is no fun, but at least it let me do testing and see if my apps needed fixing for the iOS 8 public release.
Extended description of problem at https://devforums.apple.com/thread/246751
I tried everything mentioned above and nothing worked.
Finally the only way to make it work was unsetting DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib
How I did this:
Open terminal and typing "sudo vi /etc/launchd.conf"
Changing
"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
to
"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
Save changes
Reboot your system
In this post [1] explain what DYLD_INSERT_LIBRARIES is for
[1] https://stackoverflow.com/a/26053165/2091181
I got this issue when moving from Beta 6 to Beta 7. Very frustrating. I could reset content and settings on any of the iOS 8 simulators. None of my iOS 8 simulators were working at all, just a black screen. I restarted my machine during the process, but I am not sure if it did anything. Initially I had only iOS 8 Simulators. I had to remove and reinstall Xcode6Beta7. I did not get the Install More Components the first time I installed it, I am not sure if that was the missing part. I installed the iOS 7 Simulators from Settings->Downloads because my iOS8 ones were not working. After I had reinstalled and relaunched the simulator, I then had a list of iOS 6,7,& 8 simulators. None of the iOS 8 Simulators were working. I was able to launch the iOS7 simulator and then using the device menu change to an iOS 8 Simulator. Some still did not work, I had to remove them and re-add them in the devices screen.
Remove XCode6Beta from Applications.
Restart Machine (Just in case, this seems to solve some peoples issue completely)
Install XCode6Beta.
Verify the Install Additional Components ran.
Launch Xcode6Beta.
Preferences->General->Change Command Line Tools to Xcode 6.0.
Restart Xcode.
Preferences->Downloads->Download iOS 7 Simulator (If not already downloaded).
Run App on iOS 7 Simulator (Or launch iOS Simulator and switch to iOS 7 device)
If the iOS 7 Simulator is working, Hardware->Devices->Select an iOS 8 simulator.
Delete and recreate any non working iOS 8 Simulators in Window->Devices from Xcode.
I wrestled with this for a bit, with the simulator app reporting that it couldn't find the iOS8 simulator, and suggesting updating in Prefs/Downloads, which didn't work. I tried re-installing Beta 6 twice (without removing all the support files, which would have been next). The initial installation described itself as build 6A280c; a fresh download yielded build 6A280e. No luck.
Eventually, I opened Window -> Devices, and used the "+" button in the lower left to add a new simulator for iPhone 5s, iOS 8, naming it "Fresh 5s". The Schemes popup now displayed three iPhone 5S/iOS 8 options (none with the name I designated, but differentiated by UUIDs); at least one of them worked.
I'm guessing that this feature (collections of arbitrary simulator instances) will be very useful when it's baked. In the meantime, I guess I'll need to manage the list of simulators manually.
Do following steps worked for me:
1. Launch the iOS Simulator and go to iOS Simulator --> Reset Content and Settings...
2. Close all the applications and restart your mac
3. Open Xcode6.0.1 or 6.0 and test the iOS Simulator
Had the same problem after moving from Xcode 6 beta 5 to beta 6, but also for the iOS 7.1 simulator. Restarting my machine seemed to do the job. I did not need to update from Xcode 5.1.1 CLT to Xcode 6.0 CLT.
I tried all of the solutions above, and was still unable to launch the iOS8 Simulator. The iOS7 Simulators all launched fine.
Looking at the Console, I found that the launch was crashing, and the crash log complained about the dynamic library, libimckit.dylib. You can read about that here:
https://discussions.apple.com/thread/5781366?start=0&tstart=0
The quick solution, remove that and its partner library, reboot, and it loads.
Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log?
The "Unable to boot the iOS Simulator." error message is almost always because launchd_crashed because DYLD_INSERT_LIBRARIES was set to something not compatible with the iOS Simulator runtime. Do you have any crash logs (eg: launchd_sim crashes) in ~/Library/Logs/DiagnosticReports? If so, check if they show DYLD_INSERT_LIBRARIES being set. If that's the case, your options are to either update to an OS X Yosemite host (which will deal with this issue) or unset DYLD_INSERT_LIBRARIES (likely set in /etc/launchd.conf or ~/.launchd.conf)
Force Quit All the apps including xcode and simulator
Restart MAC
Checking in the "Locations" Xcode preference, I had two items of the same version, one located in the app translocation area (/var/.../AppTranslocation/...). Also I had previously done a manual command line tools install. To resolve this in the end I had to delete /Applications/Xcode.app and remove the manual command line tools install:
sudo rm -rf /Library/Developer/CommandLineTools
Then installed Xcode anew, and rebooted. Boom! Simulator working again.
Reboot your mac os. its working correctly on xcode 11.3.x and mac os 10.14.6.

Resources