• 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
bundle version number troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bundle version number troubles


  • Subject: bundle version number troubles
  • From: stupidFish programming <email@hidden>
  • Date: Mon, 10 Feb 2003 23:15:31 +0100

hi,

i want to use the build number for one of my functions.
i read somewhere, that

NSString *currVersionNumber = [[[NSBundle bundleForClass:[self
class]] infoDictionary] objectForKey:@"CFBundleVersion"];

gives the bundle's version (build?) number as a string. now what I need
is an int value, so after going through NSBundle.h (I think), I found
CFBundleGetVersionNumber(), which takes a bundle and returns its
version number, so I figured I would try

NSLog(@"%d", CFBundleGetVersionNumber(CFBundleGetMainBundle()));

to check if it works, but the app logs 0, whereas the first function,
returns a string that reads 425 (actual version number).

Any ideas?

Ben
_______________________________________________
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.

  • Follow-Ups:
    • Re: bundle version number troubles
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Non-activating Button
  • Next by Date: Re: Creating menu's at runtime
  • Previous by thread: Re: Non-activating Button
  • Next by thread: Re: bundle version number troubles
  • Index(es):
    • Date
    • Thread