Uproar Blog

Crafting convenient mobile apps for your life.

Understanding iPhone Base and Deployment SDK Targets

without comments

Tonight I started work on an iPhone project for a client.  As with all iPhone projects, it is important to determine what version of the iPhone OS SDK you will be targeting.  Thus, I need to pick my base and deployment SDK targets.

The base SDK is defined in Xcode as:

The name or path of the base SDK being used during the build. The product will be built against the headers and libraries located inside the indicated SDK.

Simply put, the base SDK is the maximum version of the iPhone OS that your code uses.

The deployment SDK is defined in Xcode as:

Code will load on this and later versions of iPhone OS.  Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.

Simply put, the deployment SDK is the minimum version of the iPhone OS that your app requires.

Let’s say you’re creating an iPhone game and you want this app to be available to users still on iPhone OS 2.0.  However, you’d really like to be able to take advantage of the GameKit API which was added in iPhone OS 3.0.  In this case, you would set your SDK targets as follows:

  • Base SDK: iPhone OS 3.0
  • Deployment SDK: iPhone OS 2.0

The base SDK is indicating that your game is compiled against the iPhone OS 3.0.  Thus, your app can only use APIs available in the iPhone OS 3.0 and earlier.  The deployment SDK is indicating that your game can be used on any device running at least iPhone OS 2.0.  Thus, your app can be used on a device running a later OS (eg, iPhone OS 2.1, 3.0, 3.0.1, 4.0, etc) — anything iPhone OS 2.0 or greater is fine.  Take a look at this Apple example showing  how you can optionally use a later API from your base SDK while still being compatible with your earlier deployment SDK version.

You set the base and deployment SDKs on the your app target.  This is accessed by highlighting your app target and clicking the Info button in Xcode. The screenshots below show where you can find the configuration for the base and deployment SDKs.


Written by kevin

April 23rd, 2010 at 10:15 pm

Posted in iphone,programming

Tagged with ,

Leave a Reply