{"id":20745778,"url":"https://github.com/tschoffelen/react-native-check-version","last_synced_at":"2025-05-15T08:05:39.684Z","repository":{"id":39638064,"uuid":"153749559","full_name":"tschoffelen/react-native-check-version","owner":"tschoffelen","description":"🥕 Get the latest version of your app.","archived":false,"fork":false,"pushed_at":"2025-03-31T07:00:35.000Z","size":1542,"stargazers_count":216,"open_issues_count":3,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T12:18:04.001Z","etag":null,"topics":["app-store","google-play","react-native","versions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tschoffelen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-19T08:17:36.000Z","updated_at":"2025-04-13T00:00:20.000Z","dependencies_parsed_at":"2024-06-18T15:32:02.533Z","dependency_job_id":"5e283c82-e98d-4b2c-be02-872b57c5b16e","html_url":"https://github.com/tschoffelen/react-native-check-version","commit_stats":{"total_commits":89,"total_committers":10,"mean_commits":8.9,"dds":0.3258426966292135,"last_synced_commit":"065a1dfea2d2a44a3fc95d7a037c5206e4ffba4e"},"previous_names":["flexible-agency/react-native-check-version","includable/react-native-check-version"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschoffelen%2Freact-native-check-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschoffelen%2Freact-native-check-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschoffelen%2Freact-native-check-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschoffelen%2Freact-native-check-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tschoffelen","download_url":"https://codeload.github.com/tschoffelen/react-native-check-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877967,"owners_count":21176244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-store","google-play","react-native","versions"],"created_at":"2024-11-17T07:22:42.435Z","updated_at":"2025-04-14T12:18:09.816Z","avatar_url":"https://github.com/tschoffelen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Check Version\n\n[![NPM](https://img.shields.io/npm/v/react-native-check-version.svg?style=flat)](https://npmjs.com/package/react-native-check-version)\n[![GitHub license](https://img.shields.io/github/license/includable/react-native-check-version.svg)](https://github.com/includable/react-native-check-version/blob/master/LICENSE)\n\n---\n\nAn easy way to check if there's an update available for the current app in the App Store or Google Play.\n\nNote that you need [react-native-device-info](https://github.com/rebeccahughes/react-native-device-info) to be\ninstalled for this library to function as expected, or you need to manually supply the `bundleId` and\n`currentVersion` values in the options object.\n\n## Installation\n\n```\nyarn add react-native-check-version react-native-device-info\n```\n\n## Basic usage\n\nUse the `checkVersion` method to get information:\n\n```js\nimport { checkVersion } from \"react-native-check-version\";\n\nconst version = await checkVersion();\nconsole.log(\"Got version info:\", version);\n\nif (version.needsUpdate) {\n   console.log(`App has a ${version.updateType} update pending.`);\n}\n```\n\n## API\n\n### Function usage\n\n`checkVersion()` accepts an _optional_ options object, which may contain the following keys:\n\n- string `platform`: platform to check for, defaults to React Native's `Platform.OS`\n- string `country`: App Store specific country, defaults to `us`\n- string `bundleId`: bundle identifier to check, defaults to the value retrieved using react-native-device-info\n- string `currentVersion`: version to check against, defaults to the currently installed version\n\n### Response object\n\n`checkVersion()` returns a Promise, which when resolved will return an object with the following properties:\n\n- string `version`: latest version number of the app\n- string `released`: (iOS only) ISO 8601 release date of that version\n- string `url`: download URL for the latest version\n- string `notes`: release notes of latest version\n- boolean `needsUpdate`: whether the latest version number is higher than the currently installed one\n- string `updateType`: `major`, `minor` or `patch`, based on how big the difference is between the currently installed\n  version and the available version\n\n## Changelog\n\n- `v1.1.0`: Use built-in `fetch` rather than Axios library.\n- `v1.0.18`: Update headers for Google Play HTTP request.\n- `v1.0.14`: Updated Android logic to use new Google Play endpoints.\n- `v1.0.13`: Added a try-catch within the main `checkVersion` function to prevent error responses from the HTTP requests\n  to throw errors.\n- `v1.0.12`: Replaced the [custom backend](https://github.com/flexible-agency/react-native-check-version/issues/30) used\n  previously by doing calls directly within the app. Please note Google Play has updated their web pages, making older\n  versions not functional.\n\n## Authors\n\nThis library is developed by Includable, a creative app development agency.\n\n- Thomas Schoffelen\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cb\u003e\n\t\t\u003ca href=\"https://includable.com/consultancy?utm_source=react-native-check-version\"\u003eGet professional support for this package →\u003c/a\u003e\n\t\u003c/b\u003e\n\t\u003cbr\u003e\n\t\u003csub\u003e\n\t\tCustom consulting sessions available for implementation support or feature development.\n\t\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschoffelen%2Freact-native-check-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftschoffelen%2Freact-native-check-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschoffelen%2Freact-native-check-version/lists"}