I just want to output the version number of my ios application in a settings file.
I understand that I have to add the settings file to the application folder.
W
This worked for me :
Edit the Root.plist as source : Right click on the file and choose Open As->Source Code
Add the part for the title :
PreferenceSpecifiers
DefaultValue
NoVersion
Key
Version
Title
Version
Type
PSTitleValueSpecifier
And in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Add this:
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
[[NSUserDefaults standardUserDefaults] setObject:version forKey:@"Version"];
It will work after the app has been launched the first time.