Search code examples
iphoneios7ios8push-notificationapple-push-notifications

To update ios app when newer version is available


I am totally new to ios development. I have an ios7 and ios8 app which do polling to Server to check for latest version. Once the latest version of app is available I am opening Alert Box(Notification) for user to update App.

  1. Now, once user click on Update Button, Which API I need to use to get latest version of App from Apple App Store or Web Store.
  2. And how can I move the user's saved preferences to new App.

Will be helpful If some one can put code sample to do so.


Solution

  • I found the solution to my problem.

    Every App has a unique url in the App Store.

    Lets assume you have updated your app from version 1.1 to 1.2 and releases app in app store.

    Now in the application after checking your app version you can use openURL method to redirect to the url of App in app Store

    e.g.

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"AppURL-String"]];