tschoffelen / react-native-check-version

🥕 Get the latest version of your app.
MIT License
190 stars 23 forks source link
app-store google-play react-native versions

React Native Check Version

NPM GitHub license


An easy way to check if there's an update available for the current app in the App Store or Google Play.

Note that you need react-native-device-info to be installed for this library to function as expected, or you need to manually supply the bundleId and currentVersion values in the options object.

Installation

yarn add react-native-check-version react-native-device-info

Basic usage

Use the checkVersion method to get information:

import { checkVersion } from "react-native-check-version";

const version = await checkVersion();
console.log("Got version info:", version);

if (version.needsUpdate) {
   console.log(`App has a ${version.updateType} update pending.`);
}

API

Function usage

checkVersion() accepts an optional options object, which may contain the following keys:

Response object

checkVersion() returns a Promise, which when resolved will return an object with the following properties:

Changelog

Authors

This library is developed by Flexible Agency, a creative app development agency.




Get professional support for this package →
Custom consulting sessions available for implementation support or feature development.