Re: building for 10.5 vs 10.6
Re: building for 10.5 vs 10.6
- Subject: Re: building for 10.5 vs 10.6
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 29 Jun 2010 07:06:18 -0400
On Jun 28, 2010, at 10:25 PM, Matt Neuburg wrote:
> The docs explain how to use runtime testing to void
> encountering crash-causing code on 10.5. It then becomes a process of
> testing rigorously to make sure you got it right, and of course this is far
> from easy because the machine where you're testing is different from the
> machine where you're developing. Personally I find implementing backwards
> compatibility *very* hard, which is why I generally just throw in the towel
> and require the user to use the latest system.
There is a common build-time technique that you should always use before doing runtime testing on a 10.5 machine:
Once your app is working on 10.6, temporarily change the base SDK build setting to 10.5, clean, and build on your 10.6 machine. You'll get errors for every call to a 10.6-only method, and you can then make sure they're all appropriately conditionalized. Then change the base SDK back to 10.6 (or default) and build for release (or for testing on a 10.5 machine, but now you shouldn't find any backwards-compatibility problems there).
See Technical Note TN2064 "Ensuring Backwards Binary Compatibility - Weak Linking and Availability Macros in Mac OS X," in the "One Usage" subsection of the "Solution: Availability Macros" section.
--
Bill Cheeseman - 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