iOS app update notification

2019-01-23 03:24发布

问题:

How does the iOS app update mechanism work? How to tell user that application on Appstore has been updated?Do i have to write the functionality in the code to show the update popover or is it handled by Appstore to show notification to user that app has been updated. Is there any documentation provided by apple for this?

回答1:

You can use Harpy : this module trigger a UIAlertView when a new version of your app is available on the App Store.



回答2:

  1. Apple provide exist api to get latest app information on Appstore: http://itunes.apple.com/jp/lookup/?id=app_id

Ex: http://itunes.apple.com/jp/lookup/?id=1005582646

In response of this api have version field(This is version number of latest build on AppStore)

In AppDelegate->didFinishLaunchingWithOptions, you can call above api.

  1. The way to get current version on user's device:

    NSString* currentAppVersion = [[[NSBundle mainBundle]
    infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    

Now you can compare version number from 1 and 2 to show alert or notification to user when have updated app on AppStore