Reputation: 1013
In XCode, for an IOS application target, you can set Version and Build numbers. Is there a way to access these numbers from within a program's code? I have these numbers duplicated inside my app with some user defaults and I keep thinking there's a better way to do this.
Thanks.
Upvotes: 3
Views: 739
Reputation: 22334
You can use something like the following...
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
Upvotes: 6