• 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: Getting a carbon's info string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a carbon's info string


  • Subject: Re: Getting a carbon's info string
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 05 Nov 2004 12:09:32 -0600

On Friday, November 05, 2004, at 09:51AM, Dan Saul <email@hidden> wrote:

>Wow you really went in depth there, I thank you for that, however I
>suppose due to to my lack of clarity, what i meant was to get the
>version of the app itself. What I am trying to do is  write an
>updating system for game, so I need to get the version number of the
>game before I can act on it.

Ah yes, this is a totally different beast :)

>For applications with info(strings) that is easy, but for carbon
>applications not so much.

I think you'll find that there are effectively three types of Carbon apps (binaries):

* Non-bundled CFM (contains 'vers' and 'plst' resource in the resource fork)
* Bundled CFM (contains 'vers' resource and a separate .plist file)
* Bundled mach-o (contains just a .plist file)

Having said that, there's two APIs you can read up on that should give you the proper info.  Both are defined in CFBundle.h:

CFBundleGetVersionNumber
CFBundleGetValueForInfoDictionaryKey

Note: The 'vers' resource does store version information, but for use by Mac OS 9.x and earlier only.  Although, I don't know what Mac OS X does which such apps that omit the version key from their plist, but do provide a 'vers' resource.  Hopefully that's considered a malformed plist and that developers didn't do such a thing.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting a carbon's info string (From: Dan Saul <email@hidden>)
 >Re: Getting a carbon's info string (From: Ricky Sharp <email@hidden>)
 >Re: Getting a carbon's info string (From: Dan Saul <email@hidden>)

  • Prev by Date: Re: Getting a carbon's info string
  • Next by Date: Re: Is window a drawer?
  • Previous by thread: Re: Getting a carbon's info string
  • Next by thread: Re: Getting a carbon's info string
  • Index(es):
    • Date
    • Thread