I would like to be able to get the current version of my iOS project/app as an NSString
object without having to define a constant in a file somewhere. I don\'t
An open source project of mine, App Update Tracker, offers this functionality (and more) in the form of class methods:
+ (NSString *)getShortVersionString
+ (NSString *)getLongVersionString
You would use it like so:
#import "AppUpdateTracker.h"
NSLog(@"short version: %@", [AppUpdateTracker getShortVersionString]);
NSLog(@"long version: %@", [AppUpdateTracker getLongVersionString]);