Home > Enterprise >  Retrieve the version number of the latest version of my app available on app stores
Retrieve the version number of the latest version of my app available on app stores

Time:05-05

My app is available for both Android and iOS users.

I want to do this:

I want to show version number of the app installed on mobile devices (Android phone or iPhone) and if a more recent version of the app is available on Google Play or Apple App Store then I want to show the version that is now available on app stores so that the user are aware that they are using a older version and decide whether they want to update the app they use. (I want to do this because I want to disable certain features of the app if the users are using a older version and I want to disable certain features of the app installed on the mobile devices based on the version number of the version of the app available on Google Play store or Apple App Store)

CodePudding user response:

I do not understand what exactly you want to achieve but I think AppUpdateManager is what you are looking for : https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager

CodePudding user response:

Here you can find the current version of ios(swift)app. So you can use some pop that this is current version you are using .

Then you can compare current version of app and latest appstore version.If its true then there is no need to update and if its false then you need to update.

class var applicationBuildNumber: String { if let build = NSBundle.mainBundle().infoDictionary?["CFBundleVersion"] as? String { return build } return "Empty Build no" }

}

  • Related