We prompt users to upgrade their app if they're running an outdated version. When users tap our update button, I use openURL with an address like itms://itunes.apple.com/us/app/our-app-title/id12345?mt=8
to load the App Store app to the listing for our app.
With that method, however, the resulting screen has a button labeled "Open" not "Update." If users open the App Store app first, then navigate to our app's listing (or go to the update tab), the button is labeled "Update."
Can I pass the current version as a querystring parameter in the openURL call or is there another way to make sure the Update button is shown? I cannot find current documentation on how to do so. (Everything I find is a few years old and refers to the discontinued phobos tool.)
From News and Announcement For Apple Developers.
Additional notes:
You can replace
http://
withitms://
oritms-apps://
to avoid redirects.For info on naming, see Apple QA1633:
https://developer.apple.com/library/ios/#qa/qa1633/_index.html.
Edit (as of January 2015):
itunes.com/apps links should be updated to appstore.com/apps. See QA1633 above, which has been updated. A new QA1629 suggests these steps and code for launching the store from an app:
Sample code:
Copied from here.
I would recommend you to try SKStoreProductViewController class. iTunes item identifier can be found in https://itunesconnect.apple.com -> My Apps -> Apple ID.
swift:
objective-c:
I would like to provide an answer for the Xamarin user. The following would bring up an alert offering to update and then take the user to the store.
Then the controller you are calling this code from would need to implement the interface 'ISKStoreProductViewControllerDelegate' to make the 'Cancel' button work. Then 'this' assignable to the 'Delegate' property.