• 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: How to know OS Version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to know OS Version
      • From: j o a r <email@hidden>
References: 
 >How to know OS Version (From: JanakiRam <email@hidden>)

  • Prev by Date: Re: How to know OS Version
  • Next by Date: Re: Login Item for All Users
  • Previous by thread: Re: How to know OS Version
  • Next by thread: Re: How to know OS Version
  • Index(es):
    • Date
    • Thread