FROM : Chris Hanson
DATE : Tue Nov 20 02:39:35 2007
On Nov 19, 2007, at 2:33 PM, <email_removed> wrote:
> The only way to ensure that your code is working on both platforms
> is to first compile against the 10.4 SDK to outline the areas that
> are missing because you're using 10.5 functionality.
This is incorrect.
In Xcode terminology, an "SDK" represents a set of operating system
capabilities you want your software to use, while a "deployment
target" represents the minimum version of the operating system you
want your software to run on.
Thus you can build against the Mac OS X 10.5 SDK, and set the Mac OS X
Deployment Target to 10.4, and anything you use which is 10.5-only
will be weak-linked and therefore NULL/nil/Nil when running on 10.4.
Unfortunately you can't just directly use or subclass 10.5-only
classes in this situation, since the Objective-C runtime can't handle
the situation where these class references have been resolved to Nil,
but that's pretty much the only restriction on using 10.5
functionality in code that needs to run on 10.4 (or 10.4 functionality
in 10.3, etc.).
To determine what capabilities you can use on 10.4, there's no real
substitute for the actual Mac OS X documentation. It's worth reading
to understand which features were added and modified in a particular
release of Mac OS X, and the Xcode Research Assistant has a slice
which will tell you the OS compatibility of any particular method call
or class you're using.
-- Chris
DATE : Tue Nov 20 02:39:35 2007
On Nov 19, 2007, at 2:33 PM, <email_removed> wrote:
> The only way to ensure that your code is working on both platforms
> is to first compile against the 10.4 SDK to outline the areas that
> are missing because you're using 10.5 functionality.
This is incorrect.
In Xcode terminology, an "SDK" represents a set of operating system
capabilities you want your software to use, while a "deployment
target" represents the minimum version of the operating system you
want your software to run on.
Thus you can build against the Mac OS X 10.5 SDK, and set the Mac OS X
Deployment Target to 10.4, and anything you use which is 10.5-only
will be weak-linked and therefore NULL/nil/Nil when running on 10.4.
Unfortunately you can't just directly use or subclass 10.5-only
classes in this situation, since the Objective-C runtime can't handle
the situation where these class references have been resolved to Nil,
but that's pretty much the only restriction on using 10.5
functionality in code that needs to run on 10.4 (or 10.4 functionality
in 10.3, etc.).
To determine what capabilities you can use on 10.4, there's no real
substitute for the actual Mac OS X documentation. It's worth reading
to understand which features were added and modified in a particular
release of Mac OS X, and the Xcode Research Assistant has a slice
which will tell you the OS compatibility of any particular method call
or class you're using.
-- Chris
| Related mails | Author | Date |
|---|---|---|
| Mitchell Livingsto… | Oct 27, 21:34 | |
| Shawn Erickson | Oct 27, 21:40 | |
| Patrick M | Nov 19, 23:17 | |
| ab_lists | Nov 19, 23:33 | |
| Chris Hanson | Nov 20, 02:39 | |
| Annard Brouwer | Nov 20, 10:17 |






Cocoa mail archive

