Re: Getting the version of an application
Re: Getting the version of an application
- Subject: Re: Getting the version of an application
- From: John Randolph <email@hidden>
- Date: Mon, 12 Apr 2004 09:55:45 -0700
On Apr 10, 2004, at 2:08 AM, Stiphane Sudre wrote:
Does someone know if there's some code available somewhere which
allows to get the version of an application as a NSString when you
have the absolute path of the application?
I can easily find the version for Cocoa Bundle applications using the
NSBundle API, but this leaves 2 cases to handle (if I forget Java
stuff probably):
- a Carbon application with no bundle hierarchy: I can find this using
the 'vers' resource, so no big issue
- a Carbon application with a bundle hierarchy of resource forks: this
is the case I don't have a clear idea about how to handle it.
I had a look at LaunchService just in case but no solution there.
So if there was some code available (maybe even an API but I haven't
found it yet) which is doing this, I would be interested.
Sorry, I don't think there's an API for that specifically. Checking
the CFBundleVersion key or the vers resource is all we've got.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.