{"id":13989752,"url":"https://github.com/a7ul/react-native-appstore-version-checker","last_synced_at":"2025-04-27T19:32:44.903Z","repository":{"id":57335454,"uuid":"91295938","full_name":"a7ul/react-native-appstore-version-checker","owner":"a7ul","description":"[Deprecated] A react native module to fetch the version of latest app from android playstore or apple app store","archived":false,"fork":false,"pushed_at":"2019-11-27T10:18:19.000Z","size":231,"stargazers_count":91,"open_issues_count":2,"forks_count":33,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T02:22:11.768Z","etag":null,"topics":["appstore","check","openlibrary","playstore","react-native","version"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a7ul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-15T04:43:34.000Z","updated_at":"2024-05-22T09:04:12.000Z","dependencies_parsed_at":"2022-09-14T18:50:41.844Z","dependency_job_id":null,"html_url":"https://github.com/a7ul/react-native-appstore-version-checker","commit_stats":null,"previous_names":["master-atul/react-native-appstore-version-checker"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Freact-native-appstore-version-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Freact-native-appstore-version-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Freact-native-appstore-version-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7ul%2Freact-native-appstore-version-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a7ul","download_url":"https://codeload.github.com/a7ul/react-native-appstore-version-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196129,"owners_count":21550908,"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":["appstore","check","openlibrary","playstore","react-native","version"],"created_at":"2024-08-09T13:02:02.053Z","updated_at":"2025-04-27T19:32:44.616Z","avatar_url":"https://github.com/a7ul.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# react-native-appstore-version-checker [Deprecated] ![npm](https://img.shields.io/npm/dm/react-native-appstore-version-checker.svg)\n\n[![https://nodei.co/npm/react-native-appstore-version-checker.png?downloads=true\u0026downloadRank=true\u0026stars=true](https://nodei.co/npm/react-native-appstore-version-checker.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/react-native-appstore-version-checker)\n\nA react native module to check an app's version on playstore or ios app store.\nThis module can be used to check if your app has a new version on playstore or apple app store.\nor you can even check what is the latest version of another app on playstore.\n\n\n# DEPRECATED\n\nThis package is now deprecated and will no longer be maintained. Please use https://github.com/kimxogus/react-native-version-check as an alternative.\n\n\n## Getting started\n\n`npm install react-native-appstore-version-checker --save`\n\nor\n\n`yarn add react-native-appstore-version-checker`\n\n### Automatic installation\n\n`react-native link react-native-appstore-version-checker`\n\n### Manual installation\n\n#### iOS\n\nNothing to be done here ( its pure JS for IOS ;) )\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n\n- Add `import com.masteratul.RNAppstoreVersionCheckerPackage;` to the imports at the top of the file\n- Add `new RNAppstoreVersionCheckerPackage()` to the list returned by the `getPackages()` method\n\n2. Append the following lines to `android/settings.gradle`:\n\n```\n   include ':react-native-appstore-version-checker'\n   project(':react-native-appstore-version-checker').projectDir = new File(rootProject.projectDir,     '../node_modules/react-native-appstore-version-checker/android')\n```\n\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n\n```\n   compile project(':react-native-appstore-version-checker')\n```\n\n## Usage\n\n```javascript\nimport { getAppstoreAppMetadata } from \"react-native-appstore-version-checker\";\n\nor;\n\nvar getAppstoreAppMetadata = require(\"react-native-appstore-version-checker\")\n  .getAppstoreAppMetadata;\n\n//On Android u can do\ngetAppstoreAppMetadata(\"com.supercell.clashofclans\") //put any apps packageId here\n  .then(metadata =\u003e {\n    console.log(\n      \"clashofclans android app version on playstore\",\n      metadata.version,\n      \"published on\",\n      metadata.currentVersionReleaseDate\n    );\n  })\n  .catch(err =\u003e {\n    console.log(\"error occurred\", err);\n  });\n\n//On IOS u can do\ngetAppstoreAppMetadata(\"529479190\") //put any apps id here\n  .then(appVersion =\u003e {\n    console.log(\n      \"clashofclans android app version on appstore\",\n      metadata.version,\n      \"published on\",\n      metadata.currentVersionReleaseDate\n    );\n  })\n  .catch(err =\u003e {\n    console.log(\"error occurred\", err);\n  });\n```\n\n### How To find an appid in IOS or packageId in Android\n\n#### IOS\n\n**Finding appid for an ios app**\n\nSearch for an app on itunes store. Lets take the example of `clash of clans`.\n\n\u003cbr\u003e\n\n\u003cdiv style=\"text-align:center\"\u003e\n  \u003cimg src=\"https://github.com/master-atul/react-native-appstore-version-checker/raw/master/screenshots/ios-example-screenshot.jpg\" style=\"width: 50%;display: inline;\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nThe area marked on red is the app's `appid`\n\n#### ANDROID\n\n**Finding packageId for an android app**\n\nSearch for an app on playstore. Lets take the example of `clash of clans`.\n\n\u003cbr\u003e\n\n\u003cdiv style=\"text-align:center\"\u003e\n  \u003cimg src=\"https://github.com/master-atul/react-native-appstore-version-checker/raw/master/screenshots/android-example-screenshot.jpg\" style=\"width: 50%;display: inline;\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nThe area marked on red is the app's `packageId`\n\n### Advanced Options\n\n```javascript\ngetAppstoreAppMetadata(identifier, options);\n```\n\n**params:**\n\n- `identifier` is the app package id like `com.example.app`\n\n- `options` contains values which can affect the result obtained from the store\n\n      - `jquerySelectors` [Android] object with metadata property names to dom dom element identifiers (much like jquery selector) for playstore app page. Currently to get the appversion from the page we do load `https://play.google.com/store/apps/details?id=\u003capp package id\u003e` and parse `$('body \u003e [itemprop=\"softwareVersion\"]')` but you can optionally pass in a custom selector if you want. This is useful if dom structure of the app store page changes in the future.\n\n      - `typeOfId` [iOS] (default is `id`) It can be either `id` or `bundleId`. If the `typeOfId` is `id` you need to pass `identifier` as appid and if `typeOfId` is `bundleId` you need to pass bundleIdentifier to `identifier`. It is basically, the query parameter for `https://itunes.apple.com/lookup?${typeOfId}=${identifier}`.\n\n  Currently to get the ios version number from app store we hit the url `https://itunes.apple.com/lookup?id=\u003capp id\u003e` by default.\n  or we can also hit\n  `https://itunes.apple.com/lookup?bundleId=\u003capp bundle id\u003e` if we pass typeOfId as `bundleId`.\n  When we hit the above said urls we get json with all the info of the app.\n\n      - `country` [iOS] (default is `us`) The two-letter country code for the store you want to search. The search uses the default store front for the specified country.\n\n```javascript\nconst storeSpecificId =\n  Platform.OS === \"ios\" ? \"529479190\" : \"com.supercell.clashofclans\";\n\ngetAppstoreAppMetadata(storeSpecificId, {\n  jquerySelectors: {\n    version: \"[itemprop='softwareVersion']\"\n  },\n  typeOfId: \"id\",\n  country: \"de\"\n});\n```\n\n```javascript\ngetAppstoreAppVersion(identifier, options);\n```\n\n`getAppstoreAppVersion` has been maintained with previous versions for backwards compatibility. The only difference is that instead\nof `jquerySelectors`, the `options` objet only takes one selector for the app version and it's called `jquerySelector`.\n\n**Example**\n\n```javascript\nconst storeSpecificId =\n  Platform.OS === \"ios\" ? \"529479190\" : \"com.supercell.clashofclans\";\n\ngetAppstoreAppVersion(storeSpecificId, {\n  jquerySelector: \"[itemprop='softwareVersion']\",\n  typeOfId: \"id\",\n  country: \"de\"\n});\n```\n\nQuick note: it will get the public version from stores, that is, will not get alfa, beta or internal versions.\n\n### Contributors\n\n- [Atul R](https://github.com/master-atul)\n- [Dmytro Gorelik](https://github.com/dhorelik)\n- [Oleg Filimonov](https://github.com/olegfilimonov)\n- [Carlos](https://github.com/carl0395)\n- [EricH](https://github.com/jehartzog)\n- [Regan Langford](https://github.com/ReganL)\n- [Yuttana K](https://github.com/Thunderbird7)\n- [Luís](https://github.com/luissmg)\n- [Grover TB](https://github.com/grovertb)\n- [David Saltares](https://github.com/dsaltares)\n\n### License\n\nMIT\n\n© Atul R\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7ul%2Freact-native-appstore-version-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa7ul%2Freact-native-appstore-version-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7ul%2Freact-native-appstore-version-checker/lists"}