Xcode only lets me run for an iOS device (no simulator)
XcodeSimulatorXcode Problem Overview
I just cloned a project into Xcode and am trying to run it in the simulator. However, my only option is iOS Device. This is unique to this project only and I don't know how to fix it. Anyone else run into this and know how to fix it?
Xcode Solutions
Solution 1 - Xcode
Under Your project Build Settings
- select Deployment section
- change iOS Deployment Target to a version iOS 5.0 or less
- now you can go ahead and change the deployment target from device to simulator!
In my case the deployment target was set to version 5.1 and i still am running snow leapord OS with appropriate JARS copied from xcode 4.3 to make it run with a device running iOS 5.1.
However, my simulators do not yet support version 5.1 so till i changed the deployment target to lower version e.g. 5.0 or 4.2 it won't let me run on simulator.
Solution 2 - Xcode
Click to target or project > Build Settings > Achitecture > Supported Platforms : change to iOS
Solution 3 - Xcode
What worked for me was going to Window>Devices and pressing the plus button at the bottom left to add a device and choose the simulator you want to add.
Solution 4 - Xcode
The problem for me happened when I downloaded a project from someone else and their deployment target was like 10.2 and my Xcode wasn't fully updated so it only supported til 10.0.
Solution was :
Click on project >> General >> Deployment Info >> Deployment Target
From there just change it from a grayed out number to a number that it's not.
Solution 5 - Xcode
No big deal. I have just restarted the Xcode & iOS simulator. Then, it displayed all the simulators.
Solution 6 - Xcode
After restoring from time machine, I had to reinstall the 8.1 simulator (settings > Download) and then adding simulators in "Window > Devices > + > Add simulator"
Solution 7 - Xcode
for me just go to Settings, tab "Downloads" and download the simulator ;) Append after changed computer (resored by TimeMachine) Regards,
Solution 8 - Xcode
Under Build Settings, verify that you have selected a valid SDK under iOS Deployment Target
. Mine was set to 7.1 (which appeared in a different seciton in the dropdown) which wasn't installed. Selecting 7.0 (or obviously downloading 7.1) does the trick.
Solution 9 - Xcode
What had happened to me was that I created a project using a device that had the latest iOS installed, 8.3. When I moved that project to another computer without a device the simulators didn't appear for me to choose from, only the device (which I didn't have). The reason was that the simulators only went up to 8.1 (which is less than 8.3, obviously). So I changed the 'Deployment>iOS Development Target' to 8.1 (from 8.3) in Build Settings and the simulators appeared in Xcode as expected.
Solution 10 - Xcode
for now you just change device/simulator from Product -> Destination -> pick the device. Then Run your application.enter image description here
Solution 11 - Xcode
When none of the above steps work, check to see that your device is plugged in and turned on. (None of the above steps worked for me, and the device WAS plugged in. Oh well.) However, I have Xcode 7.3.
Solution 12 - Xcode
If you've run into this problem on Xcode-8 than, following the same process, you can set the Deployment Target by selecting Targets instead of Projects and lower the deployment target as shown in the image below:-
You will have options to select the simulator devices now.
Solution 13 - Xcode
Go to BuildSettings, see Code Signing... under Code Signing Identity, change all entitlements to "Don't Code Sign".
Hope it helps.
Solution 14 - Xcode
Obviously I thought that there was some kind of a serious issue. In fact I fixed it by selecting from Product/ Destination the iOS Simulator that was lost. No such big deal after all.
Solution 15 - Xcode
I tried every suggested solution I could find on stackoverflow.
Eventually, I deleted the Xcode app and downloaded it again from the App Store. After installation, the simulators were back.
Solution 16 - Xcode
- 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.
Solution 17 - Xcode
First of all you need to install the simulators
Install Simulators followed by,
- Open Xcode,
- Goto Preferences,
- Select Component
- Click on Simulators of your choice then it will start the process of download & installing the simulators
Adding Simulators to Xcode [Click for Apple Reference] 1
-
From the Spotlight Search type 'Simulator' and press enter
-
Choose Hardware > Device > Manage Devices. Xcode opens the Devices window.
-
At the bottom of the left column, click the Add button (+).
-
In the dialog that appears, enter a name in the Simulator Name text field and choose the device from the Device Type pop-up menu.
-
Choose the OS version from the iOS Version pop-up menu.
-
Alternatively, if the iOS version you want to use isn’t in the iOS Version pop-up menu, choose “Download more simulators” and follow the steps to download a simulator.
-
Click Create.
Solution 18 - Xcode
What you can do to add Simulators in your xCode is go to
Windows -> Devices
There on the bottom left, press the plus button. In this way you can add different simulators with OS as per you need.
Solution 19 - Xcode
For what it's worth, my issue seemed to be that I had two different versions of xcode running at the same time (8.2 and 9.2). Xcode might grab a list of simulators and, as resources, lock them up and make them unavailable for other versions of xcode to avoid issues. I killed (cmd+q) both xcode instances, restarted the one I needed at that point, and then the simulators showed up again.
Hope this helps anyone else, since it took me quite a bit of time to figure this one out, since it was an 'on and off' kind of issue.