views:

1224

answers:

2

I know that parts of this question was asked in several variation but I want to make sure I got it right.

Here are my assumptions and understandings which I want to know if they are correct before submitting.

My application assumes features supported by all OS, and so I should:

  1. Set the Active SDK to be the latest (currently SDK 3.0).
  2. Set the Deployment Target to be the lower I want to be supported - iPhone 2.0 and higher?
  3. What exactly is the Base SDK for? should I ignore it if I chose Active SDK to be different and where do I see the Active SDK in the Projects settings?

One final question - is apple allowing to choose iPhone OS 2.0 as the Deployment Target?

Thanks in advance,

BTW - one of my main reason for this question is because when compiling with earlier SDKs apple seems to have a problem releasing the memory for UIImageView animation array when this animation was saved for multiple time usage. This is a known problem that was fixed with SDK 3.0 (by simply setting the UIImageView animation array to nil)

+5  A: 

The difference between the Base and Active SDK is that the former is the default SDK set for the project and the latter is the SDK you are currently building against. So it is possible for your Active SDK to be the Base SDK, at which point XCode will use the SDK you specified for the project.

In order to build your app for the widest set of devices possible, you are correct:

  • Set the Base SDK to the lastest SDK possible (3.0, 3.0.1)
  • Set the Deployment Target to the earliest SDK possible (2.0)

Apple does allow you to specify iPhone 2.0 as the Deployment Target, but keep in mind any API or framework released after iPhone 2.0 you will not have available to you for use by default. There are techniques to use features from later SDKs, however they are nontrivial.

fbrereto
+1  A: 

You should set the Base SDK build setting to the latest SDK that contains all of the features that you intend to use (usually, the latest available SDK), and set the "iPhone Deployment Target" build setting to the earliest version of the OS on which you want to run.

You then need to make sure that you check, at runtime, for any features that may not exist on the earlier OSes.

clarkcox3