1

I think the problem first occurred after I updated Xcode to version 5.0.2:

Screenshot

Whichever scheme I set in Xcode - whether it's iOS 5.0, 5.1 or 7.0 - when I build and run the project the simulator always launches my app in an iOS 7.0.3 environment (that's what the simulator's windows title states). So there is no way to test my app for downwards compatibility.

What's the problem here? Is there some other trick that I need to perform in order to simulate my app in an iOS 5.1 environment?

Kara
  • 6,115
  • 16
  • 50
  • 57
Mischa
  • 15,816
  • 8
  • 59
  • 117
  • possible duplicate of [How to Install Older iOS Simulators in XCode 4.2.1 (SDK5.0)](http://stackoverflow.com/questions/8529572/how-to-install-older-ios-simulators-in-xcode-4-2-1-sdk5-0) – Almo Jan 21 '14 at 15:50
  • @Almo: No duplicate - the simulators 5.0 and 5.1 are both installed (and they are not in the list under Xcode -> Preferences -> Downloads) and as you can see from the screenshot I can even select the scheme iOS 5.1 but if I build und run the project it's somehow still running in the iOS 7.0.3 simulator. It used to work before the Xcode update. – Mischa Jan 21 '14 at 15:55
  • Close vote retracted. – Almo Jan 21 '14 at 18:31
  • I've also installed Xcode 5.0.2 just now. After starting an app in Simulator with 5.1 scheme, the title of the Simulator's window shows "... iOS 5.1 (9B176)". So here it works and the problem is not the Xcode version. – Daniel S. Jan 22 '14 at 11:22
  • My Simulator version is 7.0 (463.9.4.2). What's yours? – Daniel S. Jan 22 '14 at 11:31
  • I have the same Simulator version installed. – Mischa Jan 22 '14 at 12:17

3 Answers3

1

After searching for solutions for hours I finally found the reason why I cannot select other iOS versions in the Simulator:

It's Mavericks!

In this post in the Apple Developer Forums (Developer account needed to access the forum!) an Apple employee states:

The iOS 5 simulators do not work on OS X 10.9 (Mavericks).

and he says the reason for that is:

The iOS simulator does not duplicate some of the low-level parts of iOS. For example, it uses the host OS X's kernel instead of trying to virtualize the iOS kernel. The iOS simulator requires that these subsystems look sufficiently similar between the simulated iOS and the host OS X. When a new host OS X changes too much it can break old simulators. At that point somebody makes an engineering and cost decision to either update the old simulator or drop support for it.

So if you have installed Mavericks (and do not downgrade if that's even possible) you have no option to run the Simulator with iOS versions < 6.

(If you want to test your app in the Simulator with iOS 6 and 6.1 SDK proceed as the other replies and comments on this page suggest: Go to XCode > Preferences > Downloads and download the corresponding simulator version in the section "Components".)

Mischa
  • 15,816
  • 8
  • 59
  • 117
0

Check if YourTarget->Build Settings->Deployment->iOS Deployment Target is set to iOS7.0. If so, you need to decrease this value.

-1

You must download to Xcode the iOS 5 SDK for the simulator.

Go:

XCode -> Preferences -> Downloads -> Components

And there you have the option of download the previous simulator.

After that, restart Xcode and before running is just select the version of iOS you want the simulator use:

enter image description here

Miguel Chaves
  • 139
  • 1
  • 9
  • That is not my problem. I can select the iOS 5.1 Simulator just as shown in your screenshot. But simulator will still simulate an iOS 7.0.3 scheme (see comments below my question). – Mischa Jan 21 '14 at 17:19
  • Thanks for the down vote.. Did you tried to reinstall the simulator? – Miguel Chaves Jan 21 '14 at 17:33
  • I have removed and reinstalled the simulator and Xcode itself several times with no effect. – Mischa Jan 22 '14 at 18:11