• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Gracefully failing on unsupported OS version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gracefully failing on unsupported OS version


  • Subject: Re: Gracefully failing on unsupported OS version
  • From: Bill Cheeseman <email@hidden>
  • Date: Mon, 18 Apr 2005 16:42:04 -0400

on 2005-04-18 3:18 PM, Rosyna at email@hidden wrote:

> Even then, that's only if you don't take advantage of weak linking.
> Which is pretty trival to do.
>
> if (TigerOnlyFunction)
> TigerOnlyFunction("Hello!");
>
> Ack, at 4/18/05, Ali Ozer said:
>
>> If you use Tiger symbols or function calls (not methods or classes)
>> which are not appropriately weakly linked (they aren't declared as
>> AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER), your app might refuse to
>> launch at all.

Just to be clear, what Ali was describing are C functions that are not
marked with an availability macro. In that case, branching around the
function call does not allow the code to load. It's a dynamic loader issue
that you can't code around by simple branching. (Branching around
Objective-C method calls does work.)

I encounter this issue frequently when developing under early beta seed
releases of a new version of Mac OS X, in which the engineers haven't gotten
around to adding the availability macros to the new headers. There is a
workaround: redeclare the function in your own headers with the appropriate
availability macro. In fact, I think it was Ali who put me onto that
workaround.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Gracefully failing on unsupported OS version (From: Rosyna <email@hidden>)

  • Prev by Date: Re: Strange problem when not declaring the functions in interface
  • Next by Date: Re: Hiding Rows in NSTableView
  • Previous by thread: Re: Gracefully failing on unsupported OS version
  • Next by thread: Re: Gracefully failing on unsupported OS version
  • Index(es):
    • Date
    • Thread