Re: Finding os version at compile time and os version at runtime?
Re: Finding os version at compile time and os version at runtime?
- Subject: Re: Finding os version at compile time and os version at runtime?
- From: Andrew Farmer <email@hidden>
- Date: Sat, 15 Dec 2007 19:49:27 -0800
On 15 Dec 07, at 18:59, Nik Youdale wrote:
I made a little class once that gets the OS version at runtime. It
worked on Tiger, haven't used it for a long time though.
+ (SInt32)macOSVersion
{
SInt32 MacVersion;
if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr) {
return MacVersion;
}
else
return 0;
}
The Gestalt function is a carbon function, so I guess it won't work
on leopard.
Carbon is still available under Leopard. The only limitation is that
certain parts of Carbon (primarily HIToolbox) aren't available in 64-
bit applications.
_______________________________________________
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