bodacious
bodacious

Reputation: 6705

How can I find my App's full version number from the mainBundle NSDictionary?

I know I can find the bundle version from the mainBundle NSDictionary via

NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey];

This doesn't gives me the full version though. How do I access the object via the CFBundleShortVersionString key?

Upvotes: 1

Views: 438

Answers (1)

Pooria Azimi
Pooria Azimi

Reputation: 8643

I think you can do something like:

NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];

You're not limited to konstants!

Upvotes: 6

Related Questions