I need to test a crash occurring in iOS 4.0 (not 4.3).
There's no simulator is there?
How can I test this version of iOS when the current one is iOS 5.0?
I need to test a crash occurring in iOS 4.0 (not 4.3).
There's no simulator is there?
How can I test this version of iOS when the current one is iOS 5.0?
In Xcode 4.2 you can click on the Scheme dropdown list (near the top left corner of the window) and at the bottom of the list is a "More simulators..." option. Click on that and you are given the ability to download simulators for older versions of iOS. If that doesn't do what you need, maybe change your target's Deployment Target?
For that, You need to obtain the iPhoneSimulator4.0.sdk folder.
The easiest way to do this is to download and install an older version of Xcode - the folder you will be looking for will be located in
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
In Xcode 4.3 on lion the simulator SDKs are located inside the
Xcode.app
in your applications folder.Copy the obtained
iPhoneSimulator4.0.sdk
into thenew location:-
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
restart Xcode.
I don't know if an Xcode upgrade will remove these files in the future - it might be beneficial to keep the older SDKs in a safe place in case you need them again.
developer.apple.com might be useful
In Xcode 4.3 if you click next to the Run/Stop buttons to get the Simulator drop-down, you can then click "More Simulators..." and download older versions of iOS simulator.
Here's a screenshot