0

This is not a duplicate. The referenced duplicate question specifically asks

"Is there a way in objective-C to find out what the version is of my app?"

whereas the current question asks how it can be found without writing any code.

Possible Duplicate:
How can my iphone app detect its own version number?

I am writing an ios app and would like my trial users to be able to tell me what version they are using.

I know that you can programmatically display the installed version of your app to a user as in these two posts: How can I check the bundle version of our application programmatically? and How to display the current project version of my App to the user?

But do I have to do it programmatically? How can I show ios app version number WITHOUT objective-c code? On android the version is automatically available under Manage Applications.

Community
  • 1
  • 1
jermel
  • 2,326
  • 21
  • 19
  • Does this link help? http://www.iphonedevsdk.com/forum/iphone-sdk-development/17740-how-to-get-the-app-version-number.html – Hans Z Jul 25 '12 at 15:06
  • Also what's wrong with http://stackoverflow.com/a/2657500/1417974 – Hans Z Jul 25 '12 at 15:07
  • @Hans Z well im asking if it is ONLY available programattically (by me writing additional code just so a user can see it) – jermel Jul 25 '12 at 15:10
  • 1
    The iPhone Configuration Utility and iTunes both display that information on installed apps - just, not on the device but on MAC or PC. – Till Jul 25 '12 at 15:38
  • @Till thanks that would have been sufficient - Juan M.'s answer is best – jermel Jul 25 '12 at 15:50

3 Answers3

1

The following code will give you the version you have defined in your plist. You can use that to populate a UILabel.

NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey];

You could use that information to populate a Settings Bundle so that it would show up in the main settings.app on the phone.

WhoaItsAFactorial
  • 3,538
  • 4
  • 28
  • 45
1

There is no built in support for showing the user the bundle version. You should use the links you have found to fetch and display the value yourself.

If this is a matter of finding out already distributed app's version numbers, there are ways of reading the plist, but this doesn't use built-in support. You might want to have a look at iFile (if jailbroken) or iExplorer if not jailbroken. These allow you view the ios device filesystem and read files directly. (iExplorer is limited to what files you can read, but you can read Info plists)

James Webster
  • 31,873
  • 11
  • 70
  • 114
1

I think you want to show your current version in the Settings bundle and the use your Info.plist to know the version as explained in the links in your question.

Here is a little tutorial: http://www.slideshare.net/livatlantis/iphone-dev-application-settings-and-defaults

Hope to be useful!

Juan M.
  • 146
  • 1
  • 9
  • Thanks even though settings bundle was intended for configurable settings, this will work fine. – jermel Jul 25 '12 at 16:18