It's easy to set the build and version numbers manually in Xcode, and I learned how to increment them with a macro at build time. But how do I reference their values in code?
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; NSString *appVersion = [infoDict objectForKey:@"CFBundleShortVersionString"]; // example: 1.0.0 NSString *buildNumber = [infoDict objectForKey:@"CFBundleVersion"]; // example: 42
2.1m questions
2.1m answers
60 comments
57.0k users