68

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?

screenshot

Eli Barzilay
  • 29,301
  • 3
  • 67
  • 110
swickblade
  • 4,506
  • 5
  • 21
  • 24

19 Answers19

119

Under Your project Build Settings

  1. select Deployment section
  2. change iOS Deployment Target to a version iOS 5.0 or less
  3. 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.

Dan Beaulieu
  • 19,406
  • 19
  • 101
  • 135
Samuel Sharaf
  • 1,237
  • 1
  • 8
  • 6
63

Click to target or project > Build Settings > Achitecture > Supported Platforms : change to iOS

shim
  • 9,289
  • 12
  • 69
  • 108
Gank
  • 4,507
  • 4
  • 49
  • 45
  • 1
    mine was using iphoneos, my project is exported from unity, will changing it to ios create a problem? – tiw Apr 26 '16 at 11:24
  • Thank you Gank for the current answer! @tiw This was the same use-case for me. You should be fine, but you should also be exporting from unity for a clean build before you make any final products. – Maitreya May 13 '16 at 22:00
  • I encountered this issue after building the iOS project from unity. Unity set some other strings in this field. After changing it, I can select the simulators from the menu. – peteroid Dec 28 '16 at 10:54
  • Exactly this. For some reason I had selected `iphoneos` – Mikel Aug 17 '17 at 15:02
  • Thank you! I have same issue when export from Unity – dandepeched Oct 09 '18 at 18:28
40

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.

Brandon M
  • 933
  • 1
  • 8
  • 8
8

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.

enter image description here

mfaani
  • 33,269
  • 19
  • 164
  • 293
4

No big deal. I have just restarted the Xcode & iOS simulator. Then, it displayed all the simulators.

Asif Bilal
  • 4,309
  • 3
  • 17
  • 27
4

After restoring from time machine, I had to reinstall the 8.1 simulator (settings > Download) and then adding simulators in "Window > Devices > + > Add simulator"

CedricSoubrie
  • 6,657
  • 2
  • 39
  • 44
3

for me just go to Settings, tab "Downloads" and download the simulator ;) Append after changed computer (resored by TimeMachine) Regards,

CKJBeOS
  • 73
  • 7
1

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.

Sveinung Kval Bakken
  • 3,715
  • 1
  • 24
  • 30
1

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.

1

for now you just change device/simulator from Product -> Destination -> pick the device. Then Run your application.enter image description here

Prakash Raj
  • 1,943
  • 1
  • 15
  • 13
1

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.

Steve
  • 1,229
  • 19
  • 41
1

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:-

enter image description here

You will have options to select the simulator devices now.

Aashish
  • 2,532
  • 2
  • 23
  • 28
0

Go to BuildSettings, see Code Signing... under Code Signing Identity, change all entitlements to "Don't Code Sign".

Hope it helps.

0

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.

0

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.

OscarWyck
  • 2,515
  • 5
  • 21
  • 26
0
  1. Click on your project root.
  2. Then Go to the Build settings.
  3. Then set iOS deployment target 5.0
  4. Then select iphone6 on top left of your project.

    https://i.stack.imgur.com/KJxaA.png

iOS Lifee
  • 2,091
  • 23
  • 32
0

First of all you need to install the simulators

Install Simulators followed by,

  1. Open Xcode,
  2. Goto Preferences,
  3. Select Component
  4. 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 2. Choose Hardware > Device > Manage Devices. Xcode opens the Devices window.

  1. At the bottom of the left column, click the Add button (+).
  2. 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.
  3. Choose the OS version from the iOS Version pop-up menu.
  4. 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.

  5. Click Create.

krish2me
  • 9
  • 7
0

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.

MrWaqasAhmed
  • 1,479
  • 12
  • 12
0

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.

Ale Ravasio
  • 98
  • 12