Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: how to test my app on older versions of iOS

Tags:

xcode

ios

testing

I would like to test my app on older versions of iOS. By "older versions" I mean iOS 5.1 5.0 and 4.3. In order to do so, what should I do in Xcode? I've already downloaded (through Xcode) all the corresponding simulators, but I don't know how to build and run my app on a specific simulator. The only choice I have is to run my app on iPhone/iPad 6.0 simulator.

Thanks.

like image 452
pAkY88 Avatar asked Oct 31 '12 11:10

pAkY88


People also ask

How do I run an older iOS app?

Open the App Store and download the app you want. Go back to your old iPhone device and open up the App Store. Navigate to your Account page by selecting the profile icon in the top right corner of the screen. Select Purchased to bring up a list of all your purchased apps linked to that iCloud account.

How do I test the Xcode app on my iPhone?

Open up a project in Xcode and click on the device near the Run ▶ button at the top left of your Xcode screen. Plug your iPhone into your computer. You can select your device from the top of the list. Unlock your device and (⌘R) run the application.


1 Answers

Both of these answers weren't clear enough, I'm adding this to stop people making incorrect assumptions.

The only way to test on a lower version of the iOS is to run it on a device with the lower version or on one of the lower version simulators.

The "Deployment Target", which both answers here incorrectly say runs the app on a lower version, just sets the minimum installed OS version that the app will run on. When you run it on the iOS 6 simulator - it is still running on the version 6, not to whatever your deployment target is set at.

But, without setting a lower deployment target, the option to use a different iOS Simulator isn't available.

Best practice is to build with the latest version and SDK available and set the deployment target to the lowest version that your app supports.

As for running the app on different versions of the simulator - have a look at the dropdown in the top left corner of Xcode - you can pick which of the installed simulators to run your app on from there.

like image 142
Abizern Avatar answered Nov 24 '22 12:11

Abizern