Last active
August 29, 2015 14:07
-
-
Save jamztang/7fc61f30c17022b1b550 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; | |
[[NSUserDefaults standardUserDefaults] setObject:version | |
forKey:@"version_preference"]; | |
NSString *build = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; | |
[[NSUserDefaults standardUserDefaults] setObject:build | |
forKey:@"build_preference"]; | |
NSString *githash = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"GITHash"]; | |
[[NSUserDefaults standardUserDefaults] setObject:githash | |
forKey:@"githash_preference"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let version = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") | |
NSUserDefaults.standardUserDefaults().setObject(version, forKey: "version_preference") | |
let build = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleVersion") | |
NSUserDefaults.standardUserDefaults().setObject(build, forKey: "build_preference") | |
let githash = NSBundle.mainBundle().objectForInfoDictionaryKey("GITHash") | |
NSUserDefaults.standardUserDefaults().setObject(githash, forKey: "githash_preference") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment