Can we get the version number of apps from the app store for iPhone?

Instead of using the web service to get the current version number of the application and compare it in my code to pop up an update warning, is there a way to get the version number of the application from the App Store / i-Tunes directly?

After going through all the comments, correct me if I am wrong.

  • Should we not show a local notification (as a warning) to the User about the availability of a new update programmatically?

I went, although the leadership of HIG, but could not squeeze such cretter. So little confused in decision making.

+4
source share
2 answers

Warnings such as this will certainly be against Apple recommendations. For iOS devices, the App App displays the App Store app with an icon showing the number of available updates. The developer does not need to do anything.

If you are worried that the user missed updating your application, be sure that iOS users are closely monitoring the application in the application store and know that all updates pass through it.

However, there are hacker methods by which you can understand that this is your first launch after the update without accessing the web service or the iTunes / App store.

One of the hacks I know:

Get the path to the library directory -

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); NSString *libPath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; 

libPath will be something like: / var / mobile / Applications / 8CFB747F-9446-44CB-98B9-C6FF1CF7BF93 / Library

This random line before / library changes with each update. You can save this line in NSUserDefaults and compare the path with the saved line at each start. If the lines are different from each other, this means that this is your first start after the update. Display an update warning! Then update the saved row with a new one.

NTN

Akshay

+3
source

Yes. You can perform an HTTP request on itunes.apple.com, while simultaneously selecting the User Agent string from iTunes for the URL of your application in the application store and parsing the returned HTML or XML, you will return to find a version string that may or may not be acceptable to the Apple approval team. But it's hardly worth it, and it also presents an unusual and unexpected user experience.

0
source

All Articles