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:
- 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.
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