I want to get the version number from info.plist using:
NSString *version = (NSString *)CFBundleGetVersionNumber(CFBundleGetMainBundle());
That doesn't give me the string value from Bundle Version that I expect.
This does give me the string I expect:
NSString *version = (NSString *)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey);
I'd like to know how to get the first form to work since it looks like it's the preferred way to get the version from info.plist.
Here is how I'm using the result:
htmlAbout = [htmlAbout stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@"[version]"] withString:version];
I'm working in Xcode 4.1
Thanks