Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test builds on iOS 5 and iOS 4 simultaneously

Tags:

xcode

ios

I am creating my first iOS application and I want to test on iOS 5 and the iOS 5 simulator, but still be able to build on iOS 4, which is the OS my phone is currently running? What is the best method to test for beta software? Also, what is the best way to run the current Xcode alongside the Xcode beta?

like image 881
SaamJB Avatar asked Feb 23 '23 05:02

SaamJB


1 Answers

It's always a good idea to install the beta release of XCode along side the official release, as you can't do submissions to the app store from the beta. Specifying a different directory at installation is the easiest way to do this (There's a pull down that easily missed when it displays the list of packages to be installed). The 2 installations will co-exist happily enough. Using a convention like Developer-4.0_betaX makes it easy to spot the one you want via Spotlight.

When attempting to use any new APIs, use the #defines of the new iOS version to prevent the new APIs from causing errors in the older versions.

#ifdef __IPHONE_4_0 
//APIs new to iOS 4 go here, but won't complain when built using SDK < 4.0
#endif

Multiple devices are also advisable, as the Simulator is only a simulator and not an emulator.

Probably a good idea to have a new source control branch for this development also.

like image 176
Eoin Avatar answered Mar 08 '23 10:03

Eoin