Base versus Active versus Deployment target
Asked Answered
K

4

25

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)

Konstanze answered 31/8, 2009 at 15:34 Comment(0)
S
28

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.

Spongin answered 31/8, 2009 at 16:54 Comment(1)
Don't mean to be a stickler, but OP asked about "Base SDK" and "Deployment Target." Are you using "Active SDK" to mean "Deployment Target"? Apple uses the terms "Base SDK" and "Deployment Target," which I understand means: MAX SDK = "Base SDK" and MIN SDK = "Deployment Target".Optic
S
8

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.

Sensorimotor answered 15/2, 2010 at 17:51 Comment(1)
Clear and simple answerMulatto
O
3

"Base SDK" is the Maximum SDK you application can support. There's a hard limit here - you can't select a future, unreleased SDK.

"Deployment Target" is the Minimum SDK you are willing to support. It how far back in time you are willing to go.

Xcode appear to create a spurious dependency on "Deployment Target." For example, I can't develop on my iOS 5.1.1 iPod with Xcode 4.5.2 (Xcode 4.5.2 is paired with iOS 6.0), even though the 4.3, 5.0, and 5.1 APIs and Simulators are installed on this installation. I need to use the simulator or jack in my iOS 6.0 iPhone.

The games Apple is playing appears to be causing problems with apps, too. My purchased copy of Elements will not sync via iTunes to the iPod because Elements needs a newer version of iOS to run (it syncs and runs fine on my iOS 6.0 iPhone).

I've got two iPads and one is 4.3. I shudder to think what a mess it will cause.

Optic answered 15/11, 2012 at 10:7 Comment(0)
M
1

In general;

Set the BASE SDK to the very latest SDK you are willing to support and test.

Set the Deployment Target to the lowest version of iOS you are willing to support and test.

If you happen to use Base SDK features not available on the deployment target SDK, the app will crash at runtime on older devices, so testing is vital.

An alternative / complementary process would be to use Deploymate http://www.deploymateapp.com/ which does static code analysis to identify problems.

If you are from the android world the analogies are such;

TargetSDK -> Base SDK

MinSDK -> Deployment Target

Lint -> Deploymate

Maurizio answered 29/11, 2013 at 4:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.