Related
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.
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:
Components Screen:
Also I'm having some other bugs, like, every time that I open Simulator I have this message "Unable to Determine Device".
Try to restart the simulator service:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
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.
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.
b. After changing target to 11.2
Added iPhone 5s now visible
According to your first screenshot, you're trying to create an iPhone 4S simulator for iOS 10.2.
Trouble is, iOS 10 does not support iPhone 4S, iPad 2 and a few other devices.
You should be seeing an error thrown from Xcode that looks like this:
Hopefully you already have other simulators from compatible devices for iOS 10.2 available to you on your Xcode setup.
The error was something with my current Mac User. I tried with another user and worked!
In my case I had symlinked my ~/Library/Developer folder to an external drive. Once I put that back to normal; Xcode and the simulator returned to normal behavior.
I know this question is old, but just in case... this is what worked for me:
When you have the option of pressing the create button and it doesn't work, tick the "Paired Apple Watch" button and click next.
For some reason, merely the act of progressing to that next dialogue seemed to spawn all the available devices... no idea why unfortunately. You can then cancel the dialogue and pick one of the devices and it will build perfectly.
Hope this works for someone!
The different iPhones only support a certain versions of iOS. You have to find the supported version for iPhone 4s and download that same version of the iOS simulator in the Components screen - there is a small download arrow on the left side of the iOS version.
E.g. The maximum supported iOS version for an iPhone 4s is iOS 9.3.5 so you need to download the iOS Simulator of that version (in your case the iOS 9.3 Simulator).
At least that worked for me.
Here is the link to see a list of the different Apple devices and their supported iOS versions: https://everyi.com/by-capability/maximum-supported-ios-version-for-ipod-iphone-ipad.html
I updated my Xcode to 6.0.1 from the App Store update notification
in the morning in the os X 10.9.5, and then restarted my mac.
Then i found the Xcode has been updated to the 6.0.1 ,But when i tried
to run my app on it i am getting only iOS device as the device,not
simulators.
in my simulator menu manage devices there is no simulators only my
mac is present ,then i tried to add simulators but it has given me
error of path is not found,i tried every solutions found in the web
search like locations tab command line tools,everything is fine,
But still i am not getting the simulators?Can anybody help me on this?
Might be that resolve by tap Xcode6--> Window--> Device like following image:
When you select Device Option you get following window open:
There is appear all simulator or connected devices. If you found No simulator you can add by click on + Button then you get following window create simulator.
click an option there is simulator list and you get simulator. Hope that solve you issue.
Choose Preview > iOS Simulator Version > iOS 6.0 or 6.1.*
Choose Preview > Preview in iOS Simulator.
If you don't see iOS 6.0 or iOS 6.1, see Downloading and Installing Xcode Components in the iOS Developer Library.
What is the output of 'xcrun simctl list'?
Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log to indicate a problem?
Are you able to add and delete simulator devices from the device manager?
Can you add and delete devices from the command line 'xcrun simctl create ...'?
The one thing I can suggest is checking xcode-select from a Terminal. Type xcode-select -p and look at the output. This should be the Contents/Developer directory within your Xcode application. On my machine - because I don't leave Xcode in the Application folder, it reads /Applications/Developer/Xcode.app/Contents/Developer/. Make sure it's actually pointing at where Xcode is installed. For example you may be putting Xcode in a directory other than the usual /Applications, while xcode-select is looking for the Xcode internals in a different place than where Xcode is. I've been caught out by this before now.
Follow these steps to add a (new) simulator
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Add Additional Simulator". That will open 'Device & Simulator' window.
Switch to 'Simulator' tab.
There are three field in simulator tab.
Click on '+' icon, on left bottom corner of window.
Simulator Name: Enter simulator name here
Device Type: Select iPad from this dropdown list
OS Version: Select OS version from this dropdown list
Click on 'Create'
A new simulator will be added in your Simulator option list.
Look at this snapshot to understand flow of above steps:
And if there is no simulator/OS version in simulator list, you're looking for,
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Download Simulator". That will open 'Component' window (from Xcode >> Preferences).
Select/click simulator from list, which you need to download.
Look at this snapshot:
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.
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.