Re: How to know OS Version
Re: How to know OS Version
- Subject: Re: How to know OS Version
- From: j o a r <email@hidden>
- Date: Sat, 17 Nov 2007 10:03:00 -0800
On Nov 17, 2007, at 3:25 AM, Pierre Molinaro wrote:
In Cocoa, you use the following code :
NSString * systemVersionFile = @"/System/Library/CoreServices/
SystemVersion.plist" ;
NSData * data = [NSData dataWithContentsOfFile:systemVersionFile] ;
NSDictionary * dict = [NSPropertyListSerialization
propertyListFromData:data
mutabilityOption:NSPropertyListImmutable
format:NULL
errorDescription:nil
] ;
NSLog (@"%@", dict) ;
The dictionary defines several keys : ProductUserVisibleVersion,
ProductVersion, …
I don't think that's correct:
<http://lists.apple.com/archives/carbon-dev/2007/Aug/msg00089.html>
As always, it might be good to consider *why* you're looking for the
OS version, as that will typically affect *how* you go about finding
out. This might be of relevance:
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/index.html
>
Cheers,
j o a r
_______________________________________________
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