• 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: 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


References: 
 >How to know OS Version (From: JanakiRam <email@hidden>)
 >Re: How to know OS Version (From: Pierre Molinaro <email@hidden>)

  • Prev by Date: Re: a simple task for Simula based languages
  • Next by Date: Re: Leopard broke NSView's cacheDisplayInRect:toBitmapImageRep:
  • Previous by thread: Re: How to know OS Version
  • Next by thread: RE: How to know OS Version
  • Index(es):
    • Date
    • Thread