Check If My App Has a New Version on Appstore

How To check if there is a new version of my app in the App Store on Swift5?

Yes, the method you use must be an already published app.

If you use an unpublished app, you will get results = []

Go to the App Store like this

let appId = "1454358806" // Replace with your appId
let appURL = URL.init(string: "itms-apps://itunes.apple.com/cn/app/id" + appId + "?mt=8") //Replace cn for your current country

UIApplication.shared.open(appURL!, options:[.universalLinksOnly : false]) { (success) in

}

Note:

This method will not be very timely, meaning that the application you just released, even if it can be searched in the App store, but results will not be updated immediately. Update information will be available after approximately 1 hour, or longer

iOS Swift Code Get Latest Version of App My App From App Store

It's possible to look up the current version available on the App Store using the iTunes Search API. The relevant lookup would use the app's bundle id.

https://itunes.apple.com/lookup?bundleId=com.yourname.yourapp

Within the JSON response, you will see a version property that you can compare against the installed app's version pulled from the bundle's info dictionary.

Check if my ionic app has a new version on AppStore and PlayStore

You can use Market plugin in addition to the App version plugin..

I haven't come across a solution which directly checks the app store, instead i have to maintain the app version in my server db and check it at app start.

Here is the flow that can be used..

  1. App Launches
  2. Checks the current app version using APP VERSION plugin
  3. Calls an API endpoint to my server to compare for the deployed app store version (which is maintained in the db)
  4. If the app version is outdated, use the MARKET plugin to take the user to the app store.

A Capacitor alternative to the market plugin is there, but didn't test it out.
Follow Capacitor plugins proposals, for an upcoming solution.



Related Topics



Leave a reply



Submit