All Projects â†’ flexible-agency â†’ react-native-check-version

flexible-agency / react-native-check-version

Licence: MIT license
🥕 Get the latest version of your app.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-check-version

verssion
RSS feeds of stable release versions, as found in Wikipedia.
Stars: ✭ 15 (-88.46%)
Mutual labels:  versions
available-versions
Returns a promise with new versions higher than given for a npm module
Stars: ✭ 18 (-86.15%)
Mutual labels:  versions
nmap vscan
nmap service and application version detection (without nmap installation)
Stars: ✭ 105 (-19.23%)
Mutual labels:  versions
repology-webapp
Repology web application
Stars: ✭ 114 (-12.31%)
Mutual labels:  versions
cordova-set-version
CLI and JavaScript API for setting the version in Apache Cordova config.xml
Stars: ✭ 19 (-85.38%)
Mutual labels:  versions
ansible-role-php-versions
Ansible Role - PHP Versions
Stars: ✭ 78 (-40%)
Mutual labels:  versions
spring-api-versioning
Simple development of multi-version api based on spring-mvc annotation via @apiversion, support for uri, header, param.
Stars: ✭ 46 (-64.62%)
Mutual labels:  versions
deblibs-gradle-plugin
A Gradle plugin that creates Github issue and Slack message for outdated dependencies so they can easily be tracked and manually upgraded.
Stars: ✭ 73 (-43.85%)
Mutual labels:  versions
versioce
Version bumping and changelog generation for your mix project
Stars: ✭ 19 (-85.38%)
Mutual labels:  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:

  • string platform: platform to check for, defaults to React Native's Platform.OS
  • string country: App Store specific country, defaults to us
  • string bundleId: bundle identifier to check, defaults to the value retrieved using react-native-device-info
  • string currentVersion: version to check against, defaults to the currently installed version

Response object

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

  • string version: latest version number of the app
  • string released: (iOS only) ISO 8601 release date of that version
  • string url: download URL for the latest version
  • string notes: (iOS only) release notes of latest version
  • boolean needsUpdate: whether the latest version number is higher than the currently installed one
  • string updateType: major, minor or patch, based on how big the difference is between the currently installed version and the available version

Changelog

  • v1.0.18: Update headers for Google Play HTTP request.
  • v1.0.14: Updated Android logic to use new Google Play endpoints.
  • v1.0.13: Added a try-catch within the main checkVersion function to prevent error responses from the HTTP requests to throw errors.
  • v1.0.12: Replaced the custom backend used previously by doing calls directly within the app. Please note Google Play has updated their web pages, making older versions not functional.

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].