• 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: Little question on kCFCoreFoundationVersionNumber
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Little question on kCFCoreFoundationVersionNumber


  • Subject: Re: Little question on kCFCoreFoundationVersionNumber
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 29 Sep 2003 19:26:04 +0200

It's really a runtime double value. I just checked this on a 10.2 and 10.1 OS and the built tool is returning different values.

It's the API version I'm interested in as I need to check whether a method is available or not.

On lundi, sep 29, 2003, at 18:26 Europe/Paris, Shawn Erickson wrote:


On Monday, September 29, 2003, at 08:54 AM, Stiphane Sudre wrote:

kCFCoreFoundationVersionNumber

You cannot use the above to know what version of OS your Application is running on. It is a _compile_ time macro not a runtime check.

Try reading over the following tech. note.

http://developer.apple.com/technotes/tn2002/tn2064.html

If you really want to know the OS version, not just if an API / method is supported then consider using Gestalt [1].

OSStatus status;
SInt32 response;

status = Gestalt(gestaltSystemVersion, &response);
if (status != noErr)
response = 0;

if (response >= 0x1030)
{
// we are running on 10.3 or later
}

-Shawn

[1] Code suggested by Jim Correia on the Apple Mac OS X dev list.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Little question on kCFCoreFoundationVersionNumber
      • From: Shawn Erickson <email@hidden>
References: 
 >Re: Little question on kCFCoreFoundationVersionNumber (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Little question on kCFCoreFoundationVersionNumber
  • Next by Date: Re: Little question on kCFCoreFoundationVersionNumber
  • Previous by thread: Re: Little question on kCFCoreFoundationVersionNumber
  • Next by thread: Re: Little question on kCFCoreFoundationVersionNumber
  • Index(es):
    • Date
    • Thread