Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.34 KB

README.mkd

File metadata and controls

32 lines (24 loc) · 1.34 KB

Use this bundle file to configure your project's version ID, etc. This will be visible in your App Settings.

img_6632

Just drag this folder inside your project and add the code below to App Delegate's didFinishLaunchingWithOptions

iOS 9 update:

If you're not seeing your app's version number or whatever option you've set, you must shut off and on your iPhone. Apple fails...

The string "appVersion" is defined in a .plist file inside Settings file. You can change it for whatever string you like, and add more features, for example to show more info, or actions.

Objective-C:

    - (void)settingAppVersion{
        NSString * appVersionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
         NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults setValue:appVersionString forKey:@"appVersion"];
        [defaults synchronize];
    }

Swift:

    func settingAppVersion() {
        let appVersionString = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
        let defaults = UserDefaults.standard
        defaults.setValue(appVersionString, forKey: "appVersion")
        defaults.synchronize()
    }