Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling for iOS 3.1.3, using xcode 3.2.3 (and iOS 4 that came with it)

Tags:

xcode

iphone

ios4

I've downloaded the final version (and never installed any beta versions before) of xcode 3.2.3 with sdk 4, and now I can't seem to find a way to compile my app for a 3.1.3 iOS.

Does anybody know how can I do that ?

like image 296
Doron Avatar asked Jun 23 '10 07:06

Doron


3 Answers

As it is, you can't. They probably did this on purpose to discourage new apps compiled for 3.1.3 which foils multitasking.

Instead you can compile for iOS 4 but make your deployment target 3.1.3. This doesn't really require any more real work, as long as you don't use any non-3.1.3 methods/classes etc. and the application can install and run on a 3.1.3 device. You can also then make your application multitasking aware so that it works nicely on a device that does run iOS 4 and is capable of multitasking.

Just a note: the Base SDK may be set at the project level, but you will need to go to the build settings for the target itself to set the deployment target (that setting is not available at the project level).

like image 153
Jason Coco Avatar answered Nov 10 '22 09:11

Jason Coco


To expand on Jason Coco's answer: If you go to the Project Info screen and click Build, you can choose what Base SDK to use (4.0) and then scroll down to iPhone OS Deployment Target version and set it to 3.1.3 or whatever. However, you also have to go to the Targets section under Groups & Files (red bullseye) select your target and get the Info build page, and set your iPhone OS Deployment Target there too.

Once that's done, you should be able to test it with a device that's still running 3.0 or whatever you selected.

like image 33
AndyD273 Avatar answered Nov 10 '22 08:11

AndyD273


if you want to be compatible with iPhone OS 3.x you still compile for SDK 4.0, but open target settings and choose that application can run on 3.x (iPhone OS Deployment Target). If you did not use any iOS 4.0 specific APIs then your app will run smoothly on 3.x and 4.x, here is a screenshot of setting to change:
Screenshot

like image 4
Alexander Voloshyn Avatar answered Nov 10 '22 10:11

Alexander Voloshyn