Re: Base SDK vs. Deployment SDK
Re: Base SDK vs. Deployment SDK
- Subject: Re: Base SDK vs. Deployment SDK
- From: Laurent Daudelin <email@hidden>
- Date: Mon, 28 Jun 2010 23:44:51 -0400
On Jun 28, 2010, at 14:37, Christiaan Hofman wrote:
>
> On Jun 28, 2010, at 20:09, Laurent Daudelin wrote:
>
>> There have been a few discussions about what you should set your base SDK for your projects compared to the deployment SDK and I'm a bit confused.
>>
>
> One confusion you seem to have is that there's no thing like a "deployment SDK". I assume you mean "deployment target", which has nothing to do with any SDK.
>
>> If I create a new project for iPhone and want it to be compatible with 3.1.3, I know that the deployment SDK should be that version but what about the base SDK? Setting it to 4.0, am I not going to miss warnings if I use methods or classes that were introduced in 4.0 but are not available in 3.1.3?
>>
>> I have a project for Mac OS X that targets both 10.5 and 10.6 and so far, I kept the base SDK at 10.5 because I want the compiler to give me warning if I mistakenly use something that was introduced with 10.6.
>>
>> So, if people recommend that I set the base SDK to the latest version, what am I missing if I want to support prior versions?
>>
>> -Laurent.
>
> The documentation says it very clearly: The base SDK should be set to the highest OS version from which you want to use API (typically the highest version for which you develop, and the highest version available at the time, so 4.0 resp. 10.6). The deployment target should be set to the lowest version on which your code is supposed to run (in your case apparently 3.1.3 resp. 10.5 I guess).
>
> If you never use API from 10.6/4.0 you may well (preferably) choose the lower OS version for your base SDK. As you say, this will give you warnings about using newer API that may not be available for some of your users. If you use the higher version as your base SDK, you won't get these warnings, and you have to be careful yourself. It would really be nice if the compiler could check this, but I wouldn't see how the compiler would know whether you've called it with the proper availability checks, and getting pre-emptive warnings because you /may/ do it wrong is very annoying.
>
> But in general, when you use API from the higher version (with the proper availability checks), you use that higher version for the base SDK. You may once in a while recompile your code using the lower SDK to see where you use the newer API, and check you're doing everything right.
>
> In some cases you may just want to use the lower base SDK (like 10.5) and add one or more extra interface headers (e.g. some categories) to declare the newer API you're using, perhaps enclosed by availability macros. This will give you some of these warnings, and allows you to track which newer API you're using (I do this because for me the 10.6 frameworks have some annoying bugs that basically mean I can't use the 10.6 SDK without getting several annoying and useless warnings). However that approach may only be reasonable when you use a limited amount of new API.
>
> Christiaan
The problem I just realized, at least for the iPhone, is that the oldest SDK that I can use as a base is 3.2, no 3.1 anymore. I wish 3.1 or 3.0 could still be an optional install, like 10.4 is for Mac OS X...
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden