acarolsf / checkVersion-iOS

Code to check if there is a new version on AppStore
MIT License
95 stars 23 forks source link
appstore checkversion ios swift xcode

Check Update iOS

Code to check if there is a new version on AppStore.

This code is a version based on @anupgupta-arg's code.

And is tested in a separated repository called Check Version App.

Usage

You can force the update by calling

CheckUpdate.shared.showUpdate(withConfirmation: false)

Or the user can choose if they want to update now or later by calling

CheckUpdate.shared.showUpdate(withConfirmation: true)

But, if you want to check if there is a new TestFlight version to update, you can try:

CheckUpdate.shared.showUpdate(withConfirmation: true, isTestFlight: true)

Important

Inside the code has a link from iTunes. There, you should pay attention and put the country where the application is available. Like this: http://itunes.apple.com/<country>/lookup?bundleId=\(identifier)

For example:

And, in this documentation we can use:

"https://api.appstoreconnect.apple.com/v1/apps/\(identifier)/builds"

But, we need to generate a JWT Token first.

To learn how to generate an acceptable token, you should use this documentation.

Screenshots

img_2968

img_2969