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..
- App Launches
- Checks the current app version using APP VERSION plugin
- Calls an API endpoint to my server to compare for the deployed app store version (which is maintained in the db)
- 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
How to Change Uipickerview Height
How to Trigger a Block After a Delay, Like -Performselector:Withobject:Afterdelay:
Uialertview Addsubview in Ios7
Having a Uitextfield in a Uitableviewcell
Get Location Updates For iOS App Even When Suspended
How to Write a File to a Folder Located At Apple'S Files App in Swift
Iphone Navigation Bar Title Text Color
Multiple Lines of Text in Uilabel
Importing Commoncrypto in a Swift Framework
Request Failed: Unacceptable Content-Type: Text/Html Using Afnetworking 2.0
Move Textfield Up When the Keyboard Has Appeared in Swiftui
Uitapgesturerecognizer - Make It Work on Touch Down, Not Touch Up
First and Last Day of the Current Month in Swift
Dateformatter'S Returns Nil For Specific Date Strings Without Time in Swift