Implementing Leopard features with Tiger compatibility

  • Hi, all,
    I need to implement an application that exploits at least some Leopard
    features (including Core Animation), but is compatible with Tiger (without
    the Leopard features, of course), and I'm trying to figure out how to set up
    the project.

    I assume that I should link against the Leopard framework(s) to get at the
    Leopard features, and that I need to test, at runtime, for the availability
    of the Leopard-specific methods with respondsToSelector:.  Is that the right
    approach?  (I'm on the road right now without access to a Tiger machine,
    otherwise I'd build a test case.)

    Of course, if not properly shielded by tests, calls to Leopard APIs will
    trigger runtime failures on Tiger.  I'd like to catch these in the build
    phase rather than counting on the QA testing to find them.

    I'm thinking about setting up a Tiger-only build configuration linked to the
    Tiger frameworks, and requiring the Leopard-dependent code to be wrapped in
    conditional compilation to disable it in the Tiger builds.  The Tiger builds
    would not be intended for release, but we'd include them in the nightly
    build procedures to catch improperly wrapped Leopard calls via build errors.

    Am I on the right track, or is there a better way to do this?

    TIA,

    Doug K;
  • On Jan 18, 2008 1:13 AM, Doug Knowles <knowles.doug...> wrote:
    > I assume that I should link against the Leopard framework(s) to get at the
    > Leopard features, and that I need to test, at runtime, for the availability
    > of the Leopard-specific methods with respondsToSelector:.  Is that the right
    > approach?  (I'm on the road right now without access to a Tiger machine,
    > otherwise I'd build a test case.)
    >
    > Of course, if not properly shielded by tests, calls to Leopard APIs will
    > trigger runtime failures on Tiger.  I'd like to catch these in the build
    > phase rather than counting on the QA testing to find them.

    What you're describing is called weak-linking.  Read
    http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Con
    cepts/WeakLinking.html

    for more information.

    --Kyle Sluder
  • Exactly what I needed, and timely as well.
    Thanks, Kyle.

    Doug K;

    On Jan 17, 2008 10:35 PM, Kyle Sluder <kyle.sluder+<cocoa-dev...>
    wrote:

    >
    > What you're describing is called weak-linking.  Read
    >
    > http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Con
    cepts/WeakLinking.html

    > for more information.
    >
    > --Kyle Sluder
    >
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today