views:

4649

answers:

3

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 ?

+11  A: 

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).

Jason Coco
can you explain a bit more about the project level VS build setting for the target itself ?How do I do what you wrote ?
Doron
the deployment SDK setting IS available in the project settings
valexa
The deployment SDK setting is available in the project settings, BUT I've had it where I set it there, and the target settings didn't change to reflect it. I don't know why, and maybe they'll fix it in future versions of xcode, but if it isn't working right, check the target settings.
AndyD273
+2  A: 

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

Alexander Voloshyn
+2  A: 

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.

AndyD273