• 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: Framework versioning and handling multiple OS SDK's?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework versioning and handling multiple OS SDK's?


  • Subject: Re: Framework versioning and handling multiple OS SDK's?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 8 Sep 2009 15:33:28 -0700

On Tue, Sep 8, 2009 at 3:25 PM, Brent Gulanowski<email@hidden> wrote:
> For classes, you can check whether NSClassFromString(@"Classname") returns a
> class.

This might return incompatible private versions of some classes.  For
example, NSClassFromString(@"QLPreviewPanel") will return a class with
a very different API on 10.5 than it does on 10.6.

> For selectors, you can check whether NSSelectorFromString(@"selector")
> returns a selector.

This is untrue.  NSSelectorFromString always returns a selector.

> Usually that's enough. In fact, if you pick a representative class that was
> introduced in the OS release of your choice, you can use that as a short cut
> to check for the OS version. Or you can check the version major and minor
> values using Gestalt for accurate version info:

Do not use NSClassFromString to check for OS versions.  There is
absolutely no guarantee it will work.

--Kyle Sluder
_______________________________________________

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

References: 
 >Framework versioning and handling multiple OS SDK's? (From: aaron smith <email@hidden>)
 >Re: Framework versioning and handling multiple OS SDK's? (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Re: [[NSHost currentHost] name] blocking on 10.6 ?
  • Next by Date: Re: Framework versioning and handling multiple OS SDK's?
  • Previous by thread: Re: Framework versioning and handling multiple OS SDK's?
  • Next by thread: Re: Framework versioning and handling multiple OS SDK's?
  • Index(es):
    • Date
    • Thread