tags:

views:

44

answers:

1

Background: I have XCode 3.2.3 installed and want to distribute a project, ideally to a variety of iPhone (iPod Touch?) devices, including older ones. When choosing Project -> Build -> Base SDK I'm seeing the options "iPhone Device 4.0" and "iPhone Device 3.2" (no more 3.1.x, though IIRC it was in in the previous version of XCode, before I downloaded the latest one after iOS4).

Question: How can I set my deployment target to say iPhone OS 3.0 or 3.1? Or what should I do?

(I've read through several previous StackOverflow Q&A's on similar subjects but I'm still confused. Thanks!)

+2  A: 

Set the Base SDK to 4.0 and the Deployment Target to 3.0. As long as you don't use any of the new 4.0 functionality your app will run fine on a 3.0 device. Or get a copy of the 3.0/3.1 SDK (if you can find it, don't know if Apple keeps them around for download somewhere) and install it to a separate directory.

Ole Begemann
Thanks, where exactly do I set the deployment target?
Philipp Lenssen
Just select your target -> right click -> "Get Info". Search for "deploy" an you will easily spot the correct place. :-) Make sure to make this change to all of your configurations, i.e. debug, release, and distribution.
Eiko
Thanks, I found it in Project -> Edit Project Settings -> Build [All Configurations] -> iPhone OS Deployment Target. Suppose that's the one you mentioned. Is iPhone OS 3.0 a meaningful setting for most projects? Which devices would lose out with that setting?
Philipp Lenssen
Yes, that's the one I mean. Personally, I think 3.0 is a reasonable choice. Quite a lot has changed between 2.x and 3.x so I wouldn't support OS 2.x anymore. Any iOS device Apple ever shipped can run OS 3.0+.
Ole Begemann
In fact, I don't believe you can support anything earlier than 3.0 when building with the 3.2 or 4.0 SDKs.
Brad Larson
@Ole, would you mind saying why it's important to set the base SDK to 4.0 in this instance. How does that affect the deployment target setting? Thanks.
Remover
@Remover: Since the OP only the had the choice between 4.0 and 3.2, and 3.2 is iPad-only, the choice is pretty simple.
Ole Begemann
@Ole ah, ok. you're right that is pretty simple. didn't actually realise 3.2 was ipad only what with all the 3.x's that had gone before.
Remover