19

According to the documentation should be able to choose which iOS version the simulator should run, however only the latest 4.3.2 is listed under "Hardware/Version".

The helps says: "To set the iOS release used in the simulation environment, choose Hardware > Version, and choose the version you want to test on."

I don't want to support 3.x (although it would be nice) but at least I want to simulate my app on 4.2, 4.1 and 4.0. What's going on? Why aren't they listed?

UPDATE: I'm on Lion so I cannot install an earlier version of Xcode. Before my Upgrade I could test different versions easily.

5
  • What is your deployment target set to?
    – Alan Moore
    Sep 18, 2011 at 4:05
  • There really shouldn't be any compatibility issues within a version. However, it may have something to do with which SDKs you installed with Xcode.
    – Jumhyn
    Sep 18, 2011 at 5:53
  • deployment and project targets are both 4.0.
    – Tibidabo
    Sep 18, 2011 at 9:30
  • +1 Thanks for asking this. We have the same problem in our office after some members switched to Lion.
    – Sam
    Sep 23, 2011 at 18:00
  • This is your answer stackoverflow.com/questions/9547031/ios-5-simulator/…
    – gdm
    Apr 11, 2013 at 7:09

7 Answers 7

18
+50

the problem is that you have no other Simulator SDK installed which can be used. As @dorada has mentioned you have to install an older Xcode which in fact doesn't work because you're using Lion. I haven't tried it with Lion but principally it should work like before with Snow Leopard.
I'm referencing to my other answer how to get an older Xcode (don't know if it's still working)

After you have an older Xcode version, mount the image an navigate with terminal to that volume. There should be a hidden folder Packages. open that folder with open . and locate the two .pkg files you need (e.g. iPhoneSDK4_0.pkg and iPhoneSimulatorSDK4_0.pkg) and install both.

They will appear in your root directory and you have to move them to your Developer dir (don't simply overwrite, it will delete all other SDKs. go to the last different folder it should be iPhoneSimulator4.0.sdk\ and copy that one)

DONE (and at that point I have verified it: it works on my Lion. I used the dvd image which I have started backup'ing since 3.2.1)

3
  • 1
    Thanks. It works. For me the installation created "Platforms" folder, where I only had to move iPhoneSimulator4.0.sdk folder from iPhoneSilumation.platform the SDKs were already there. Awesome. Thanks a lot! IF someone doesn't like terminal just enter "/Volumes/Xcode and iOS SDK/Packages" in "Finder/Go to folder" which brings up the hidden folder (you have to mount the SDK installer first)
    – Tibidabo
    Sep 25, 2011 at 4:55
  • Just FYI, when he says "They will appear in your root directory", they will be in a folder called Platforms under your Macintosh HD, or in Terminal, "/Platforms"
    – Abadaba
    Jan 15, 2013 at 19:21
  • Also in Mountain Lion, my Developer folder is: "/Applications/Xcode.app/Contents/Developer/"
    – Abadaba
    Jan 15, 2013 at 19:30
5

Although iPortable has the correct answer I decided to post a step-by-step guide which is easer to follow:

  1. Download Xcode 3.1
  2. Mount the dmg file
  3. In Finder menu select "Go\Go to folder" and enter "/Volumes/Xcode and iOS SDK/Packages"
  4. Install the simulators you need (Double click)
  5. Copy the simulation folders from /Platforms/iPhoneSimulator.platform/Developer/SDKs/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
  6. If your have some SDK missing Install the missing SDK from "/Volumes/Xcode and iOS SDK/Packages" and copy subfolders from /Platforms/iPhoneOS.platform/DeviceSupport/ to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for me they were all there from 3.1 to 4.3)
0
3

you may download the older ios sdk / xcode from . https://developer.apple.com/downloads/index.action

(i found this answer in another stack overflow topic actually, but now i can not seem to find that question!)

3

Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."

The download section of Xcode preferences will open,

Click the "Components" tab.

You will see a list of simulators that can be installed, click install on version you need.

The simulator will need to restart to install.

To run the newly installed version of the simulator just select it from the run menu in Xcode.

1

You actually have to install previous simulator versions, they aren't there on a new install.

Maybe you can search and download them somewhere? - we keep them on a shared drive at the office.

1
  • I'm using Lion and Xcode 4.1. Before my update (more precisely buying a new mac and restoring it from a time machine backup) I was able to select many lower versions.I'm not sure about 3.2 but 4.0 for sure. I cannot install Xcode 3.x on Lion.
    – Tibidabo
    Sep 19, 2011 at 8:16
1

After installing the Xcode 4.2 for Snow Leopard, I noticed there was a choice for iPad 3.2 Simulator, but using it just brings up some alerts that say "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." and another alert that says "Simulated application quit. Click Relaunch to try again." with Quit, Switch SDK, and Relaunch buttons.

I can successfully use iPhone 4.0 Simulator, iPhone 4.1 Simulator, iPad 4.2 Simulator, etc up to iPad/iPhone 5.0 Simulator, but really would like to have iPad 3.2 Simulator and iPhone 3.1.3 Simulator and earlier down to 3.0 if possible.

Our apps generally run all the way back to 3.0 and we occasionally receive bug reports from earlier iOS users, and would love to be able to debug these issues more effectively.

I tried the technique summarized by Tibidabo and although I am able to copy the simulator folders as mentioned, and though they show up as choices in Xcode, I cannot get them to actually run as simulators and I get the same problem alerts mentioned above.

What are other developers doing to support debugging of older iOS versions?

1
  • Well, you could develop with Xcode 3.2.x. Or you could whip out your old device that still has an old system installed and target that.
    – matt
    Nov 16, 2011 at 3:09
-2

Go to Project Settings -> Summary an change Deployment Target.

1
  • Both project and target settings are 4.0, it doesn't matter what value I use.
    – Tibidabo
    Sep 18, 2011 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.