Re: Little question on kCFCoreFoundationVersionNumber
Re: Little question on kCFCoreFoundationVersionNumber
- Subject: Re: Little question on kCFCoreFoundationVersionNumber
- From: Shawn Erickson <email@hidden>
- Date: Mon, 29 Sep 2003 09:26:09 -0700
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.