188

I'm thinking of upgrading to iOS SDK 4.2. But what I'm wondering is if I'll still be able to run the simulator as iOS 3.2. This is because I'm creating iAds for iPad but I still want to check if my program will run with iOS 3.2.

Note: I have seen a similar post to this in the past, but they weren't really helpful in giving the exact steps in how this could be done.

TheNeil
  • 3,321
  • 2
  • 27
  • 52
Shai UI
  • 50,568
  • 73
  • 204
  • 309
  • 1
    btw, i asked this question before i actually installed sdk 4.2. and i found out that from the dropdown on the left side it simply gives you the old versions. – Shai UI Nov 25 '10 at 05:56
  • Here is a very helpful thread on this, especially for Xcode 4 users on OS X Lion: http://stackoverflow.com/questions/7459399/ios-simulator-only-list-the-latest-ios-version-how-can-i-set-earlier-versions – Jan Sep 27 '11 at 12:20

11 Answers11

482

To anyone else who finds this older question, you can now download all old versions.

Xcode -> Preferences -> Components (Click on Simulators tab).

Install all the versions you want/need.

To show all installed simulators:

Target -> In dropdown "deployment target" choose the installed version with lowest version nr.

You should now see all your available simulators in the dropdown.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
t.mikael.d
  • 5,054
  • 2
  • 16
  • 11
76

XCODE 10.1

1. Goto Xcode -> Preferences (Shortcut CMD,)

2. Select Components

3. Download Simulator version

enter image description here

4. XCode -> Open Developer Tool -> Simulator This will launch Simulator as stand alone application

5 Hardware -> Device -> Manage Devices...

6. Click on + iCon to create new simulator version.

7. Specify Simulator Name, Device Type and Choose OS version from drop down.

enter image description here

8. Click Create.

9. Hardware -> Device -> iOS 11.0 -> iPhone 6

enter image description here

enter image description here

enter image description here

Thats it run enjoy coding!

Ashok R
  • 19,892
  • 8
  • 68
  • 68
27

Xcode 14:

Xcode -> Preferences -> Platforms

Then click the + button enter image description here

Eric Su
  • 725
  • 6
  • 14
  • 3
    I didn't see that small plus icon in the bottom left corner! thanks ;) – Fred K Oct 11 '22 at 12:28
  • How to install the iOS 12 simulators? I can't find them on the list – Eric Yuan Dec 13 '22 at 04:12
  • @EricYuan I have Xcode 14.0.1, the oldest simulator I have on my list is iOS 12.4. Maybe Xcode 14 doesn't support older versions than that. You might need to use an older version of Xcode if you want to run older simulators. – Eric Su Dec 13 '22 at 09:20
  • @EricSu thanks, guess Xcode 14.1 says goodbye to 12-based simulators forever. – Eric Yuan Dec 15 '22 at 04:50
  • Do you have any source that says that?(XCode 14 does not support iOS12 simulator) @EricYuan ? – Rohit Singh Feb 14 '23 at 20:57
  • @RohitSingh no I don't. That's why I asked. – Eric Yuan Feb 14 '23 at 22:41
  • @RohitSingh You don't need worry about testing iOS 12 devices in 2023 since almost no devices run on it anymore. Even popular apps like YouTube requires iOS 14+ – Eric Su Apr 21 '23 at 05:18
24

If you have iAds in your binary you will not be able to run it on anything before iOS 4.0 and it will be rejected if you try and submit a binary like this.

You can still run the simulator from 3.2 onwards after upgrading.

In the iPhone Simulator try selecting Hardware -> Version -> 3.2

ingh.am
  • 25,981
  • 43
  • 130
  • 177
  • iOS 3.0 is not included in the iOS 4.2 SDK, only iOS 3.2+. – Julio Gorgé Nov 23 '10 at 23:21
  • Oh sorry, i'm running on 4.1 where you can set the deployment target to 3.0. – ingh.am Nov 23 '10 at 23:22
  • Julio 3.2 is good enough, but how will I run the simulator as iOS 3.2 (for iPad), doesn't it only give me an option for 4.2? – Shai UI Nov 23 '10 at 23:23
  • As for weak linking, will this still install on an older device? I tried a while ago and came to the conclusion (as well as others) that if you want iAds, you need to be 4.0 minimum. – ingh.am Nov 23 '10 at 23:24
  • In Simulator: Hardware -> Version -> 3.2. I think you can also set this in your build settings. – ingh.am Nov 23 '10 at 23:25
  • ing0, i'm almost 100% sure you can weak link the iads as I have done this for the iphone... google "weak link iad" there's plenty of articles – Shai UI Nov 23 '10 at 23:27
  • I never tried it, good luck with it! Did your settings in the simulator work ok? – ingh.am Nov 23 '10 at 23:28
  • You can still set the deployment target to 3.0 (though IIRC Apple rejects things targeting below 3.1); you just can't compile against 3.0 or 3.1. – tc. Nov 24 '10 at 00:42
  • This is outdated now, just FYI – Mike Young May 16 '19 at 15:14
  • @MikeYoung Wasn't iAds discontinued, like 3 years ago? ^-^ – ingh.am May 16 '19 at 15:54
  • @ingh.am LOL I was referring to the settings part about changing the version of iOS being used, but fair point! – Mike Young May 17 '19 at 00:13
14

Open xcode and in the top menu go to xcode > Preferences > Downloads and you will be given the option to download old sdks to use with xcode. You can also download command line tools and Device Debugging Support.

enter image description here

mikemaccana
  • 110,530
  • 99
  • 389
  • 494
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
9

In XCode under Targets, right-click on your project and Get Info. Under the Build tab look for iOS Deployment Target. By changing this you should be able to test different iOS version.

alt text

Steve
  • 1,201
  • 8
  • 14
  • 3
    note: this answer is how to make it possible to run app on an older version of iOS. but I wanted to know how to simulate an older version. – Shai UI Nov 23 '10 at 23:33
  • By changing this, XCode should give you an option now to run the Simulator in an older version on the upper left drop down. Are you not seeing that? – Steve Nov 23 '10 at 23:35
  • 1
    I tried this in Xcode 4.2 with the iOS 4.0-4.1 simulator SDK installed, not bringing up anything but 5 in the top left dropdown... – Aram Kocharyan Dec 26 '11 at 15:21
9

I was searching for how to do this on a much newer version of xcode than the original question and while the answers here got me where I needed to go, they aren't quite accurate for location anymore. Xcode 11.3.1, you need to go into Preferences -> Components, then select the desired Simulators. You can also select tvOS and watchOS similators from the same window.

Components preference window from Xcode 11.3.1

N.W
  • 672
  • 2
  • 8
  • 19
  • 4
    I've done this, they've downloaded, but I still don't see the option to run them from the simulators list. – StainlessSteelRat May 03 '21 at 17:17
  • 1
    @StainlessSteelRat. check your deployment target. If your deployment target is iOS 13.0 then you will not see the downloaded simulator of iOS 12.0 or the below versions. – Shrikant Phadke Apr 06 '22 at 11:35
8

To add previous iOS simulator to Xcode 4.2, you need old xcode_3.2.6_and_ios_sdk_4.3.dmg (or similar version) installer file and do as following:

  • Mount the xcode_3.2.6_and_ios_sdk_4.3.dmg file
  • Open mounting disk image and choose menu: Go->Go to Folder...
  • Type /Volumes/Xcode and iOS SDK/Packages/ then click Go. There are many packages and find to iPhoneSimulatorSDK(version).pkg
  • Double click to install package you want to add and wait for installer displays.
  • In Installer click Continue and choose destination, Choose folder...
  • Explorer shows and select Developer folder and click Choose
  • Install and repeat with other simulator as you need.
  • Restart Xcode.

Now there are a list of your installed simulator.

hieund
  • 218
  • 3
  • 6
  • iPad 3.2 Simulator is now available for selection in Xcode but the simulator refuses to run with it: "iOS could not find the SDK. The SDK may need to be reinstalled". – brotherli May 21 '12 at 12:54
  • Sounds like the only possible option left now that Xcode 4.2 (which I installed on an older computer running Snow Leopard just so that I could get back the simulator after upgrading my main computer to Mountain Lion and discovering that it cannot run iOS 4.2 simulator) somehow refuses to download iOS 4.2 Simulator from the Downloads page (although it lists it there, nothing happens when you click its download button, possibly because Apple pulled the plug on it). Has anyone got any success using this method? – Clafou Aug 11 '12 at 21:31
6

Xcode (14.1v) -> Settings -> Platforms -> + Icon

enter image description here

Ofir Malachi
  • 1,145
  • 14
  • 20
2

Choosing older simulator versions is not obvious in Xcode 3.2.5. Older Xcodes had separate lists of "iOS Device SDKs" and "iOS Simulator SDKs" in the "Base SDK" build setting popup menu, but in Xcode 3.2.5 these have been replaced with a single "iOS SDKs" list that only offers 4.2 and "latest".

If you create a new default iOS project, it defaults to 4.2 for both Base SDK and Deployment Target, and in the "Overview" popup in the project's top-left corner, only the 4.2 Simulator is available.

To run an older iOS simulator, you must choose an older iOS version in the "iOS Deployment Target" build setting popup. Only then will the "Overview" popup offer older Simulators: back to 4.0 for iPhone and to 3.2 for iPad.

SteveCaine
  • 512
  • 4
  • 13
-4

The simulator CANNOT be downloaded from:

Xcode -> Preferences -> Downloads

Only the iOS devices symbols. As this option says:

This package includes information and symbols that Xcode needs for debugging your app on iOS devices running versions of iOS prior to iOS 4.2. If you intend to debug your app on a device running one of these versions of iOS you should install this package.

That is, you need an iOS 4.2 device to test an iOS 4.2 application

Freeman
  • 5,810
  • 3
  • 47
  • 48
  • Hmm. My XCode 4.2 says download "iOS 4.3 Simulator". Isn't that the simulator!? :-) – Christer Nordvik Jan 06 '12 at 21:05
  • 2
    Mine says the same thing, "iOS 4.3 Simulator" (plus two device debug downloads). However, none of these downloads do a thing. I press install and any/all of them just sit there at 0% not downloading a thing. I left the Mac alone for a whole day and it was still just sitting there at 0% doing nothing. – DiggyJohn Jan 18 '12 at 03:10
  • -1. This definitely does work, and does download the actual simulator. – yuji Apr 04 '12 at 19:12