VersionCheck object provides all version-check APIs in one convenient interface. It includes both synchronous properties for immediate access to app metadata and asynchronous methods for checking updates and store information.
Overview
All version-check APIs in one object.Properties
version
The current app version string.Read from
CFBundleShortVersionString on iOS and versionName on Android.
Cached at module init, so repeated reads have zero native overhead.buildNumber
The current build number.Read from
CFBundleVersion on iOS and versionCode on Android.
Cached at module init.packageName
The app’s unique identifier.This is the Bundle ID on iOS and the Application ID on Android.
Cached at module init.
installSource
Where the app was installed from, or
undefined for dev/sideloaded builds.- iOS:
"appstore"|"testflight"|undefined - Android:
"playstore"|undefined
Methods
getCountry()
Returns the device’s current 2-letter ISO country code. This is a synchronous Nitro call, noawait needed.
2-letter ISO country code (e.g.,
"US", "GB", "JP")getStoreUrl()
Returns the App Store (iOS) or Play Store (Android) URL for this app.Store URL for the current app
getLatestVersion()
Fetches the latest version of this app available in the store. Queries the iTunes API on iOS and the Play Store on Android.Latest version available in the app store (e.g.,
"1.3.0")needsUpdate()
Checks whether an app update is available by comparing the current version against the latest store version.true if an update is available, false otherwise