Re: 10.4 v. 10.5 SDK question
Re: 10.4 v. 10.5 SDK question
- Subject: Re: 10.4 v. 10.5 SDK question
- From: Ken Thomases <email@hidden>
- Date: Sat, 18 Oct 2008 00:55:38 -0500
On Oct 18, 2008, at 12:18 AM, Steve Cronin wrote:
I have developed an application with XC 3.1 on a 10.5 Intel machine
using the 10.5 SDK w/ a 10.4 deployment target.
(No GC for me!)
In testing I immediately ran into a few difficulties on a 10.4 PPC
machine.
In the course of tracking down these issues I ended up installing XC
2.5 on this 10.4 PPC machine.
I actually compiled the application under the 10.4 SDK on this
machine so I could run it in the debugger.
(I had to make surprisingly few changes to get this to happen - none
that I am unhappy about)
Converting all .xib to .nib being one major aspect (and where I
found the offending bug [filter predicate bindings...])
In fact, this exercise has left me with an increased confidence in
the application's behavior in this environment.
So I've moved the modified project back to the 10.5 Intel where it
happily compiles and runs still using the 10.4 SDK and .nibs.
So, given all that, am I correct in wanting to move the project back
to the 10.5 SDK because the underlying code is cleaner and the
compiler output is better?
You seem to have assumed that you can only compile against the 10.4
SDK by going back to Xcode 2.5 (and thus using an earlier compiler).
That's not so. If the compiler is your concern, you are certainly
able to compile against the 10.4 SDK using Xcode 3.x.
Also, what do you mean "the underlying code is cleaner"? You are
linking against the frameworks dynamically. You get the framework for
the OS on which you're running. Regardless of what SDK you link
against at build time, you're still linking against the libraries of
your runtime environment.
In general, your choice of SDK should be dictated by the latest
features you want to use. If you don't want to use any 10.5-or-later-
only features, sticking with the 10.4 SDK is safest. The reason is
that the compiler will warn you if you accidentally slip up and make
use of a newer feature.
If you want to make use of 10.5 features but still deploy to 10.4, you
have to take extra care. That's why it's not good to do so
accidentally. You need to conditionalize all uses of 10.5 features
based on their availability at runtime (checking that symbols aren't
NULL and using -respondsToSelector:) and provide fallback code for the
case when the feature isn't available.
One caveat with simply using the 10.4 SDK, though -- the 10.5
frameworks contain a number of bug fixes which are only enabled for
binaries linked against the 10.5 SDK. This is both a good and bad
thing. It means your program works consistently on Tiger and Leopard,
which makes testing easier. But it might behave consistently
incorrectly due to the bugs. Check the various Leopard release notes
for specifics.
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden