Re: How to know OS Version
Re: How to know OS Version
- Subject: Re: How to know OS Version
- From: Pierre Molinaro <email@hidden>
- Date: Sat, 17 Nov 2007 12:25:41 +0100
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, …
-Pierre
Le 17 nov. 07 à 10:56, JanakiRam a écrit :
Hi All,
Is there any way to know the operating system version i.e
either Leopard or Tiger ?
Please let me know if you have any concern(s).
Thanks,
JanakiRam.
_______________________________________________
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
_______________________________________________
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