bundle version number troubles
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.