Skip to content

Commit 7a72474

Browse files
committed
Added thanks and bumped version
1 parent 89ddec7 commit 7a72474

File tree

2 files changed

+44
-44
lines changed

2 files changed

+44
-44
lines changed

README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
[![https://nodei.co/npm/react-native-appstore-version-checker.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/react-native-appstore-version-checker.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/react-native-appstore-version-checker)
44

5-
6-
75
A react native module to check an app's version on playstore or ios app store.
86
This module can be used to check if your app has a new version on playstore or apple app store.
97
or you can even check what is the latest version of another app on playstore.
@@ -30,48 +28,49 @@ Nothing to be done here ( its pure JS for IOS ;) )
3028

3129
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
3230

33-
- Add `import com.masteratul.RNAppstoreVersionCheckerPackage;` to the imports at the top of the file
34-
- Add `new RNAppstoreVersionCheckerPackage()` to the list returned by the `getPackages()` method
31+
- Add `import com.masteratul.RNAppstoreVersionCheckerPackage;` to the imports at the top of the file
32+
- Add `new RNAppstoreVersionCheckerPackage()` to the list returned by the `getPackages()` method
3533

3634
2. Append the following lines to `android/settings.gradle`:
3735

38-
```
39-
include ':react-native-appstore-version-checker'
40-
project(':react-native-appstore-version-checker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-appstore-version-checker/android')
41-
```
36+
```
37+
include ':react-native-appstore-version-checker'
38+
project(':react-native-appstore-version-checker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-appstore-version-checker/android')
39+
```
4240

4341
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
4442

45-
```
46-
compile project(':react-native-appstore-version-checker')
47-
```
43+
```
44+
compile project(':react-native-appstore-version-checker')
45+
```
4846

4947
## Usage
5048

5149
```javascript
52-
import {getAppstoreAppVersion} from 'react-native-appstore-version-checker';
50+
import { getAppstoreAppVersion } from "react-native-appstore-version-checker";
5351

54-
or
52+
or;
5553

56-
var getAppstoreAppVersion = require('react-native-appstore-version-checker').getAppstoreAppVersion;
54+
var getAppstoreAppVersion = require("react-native-appstore-version-checker")
55+
.getAppstoreAppVersion;
5756

5857
//On Android u can do
59-
getAppstoreAppVersion('com.supercell.clashofclans') //put any apps packageId here
60-
.then((appVersion) => {
61-
console.log('clashofclans android app version on playstore', appVersion);
62-
})
63-
.catch((err) => {
64-
console.log('error occurred', err);
65-
});
58+
getAppstoreAppVersion("com.supercell.clashofclans") //put any apps packageId here
59+
.then(appVersion => {
60+
console.log("clashofclans android app version on playstore", appVersion);
61+
})
62+
.catch(err => {
63+
console.log("error occurred", err);
64+
});
6665

6766
//On IOS u can do
68-
getAppstoreAppVersion('529479190') //put any apps id here
69-
.then((appVersion) => {
70-
console.log('clash of clans ios app version on appstore', appVersion);
71-
})
72-
.catch((err) => {
73-
console.log('error occurred', err);
74-
});
67+
getAppstoreAppVersion("529479190") //put any apps id here
68+
.then(appVersion => {
69+
console.log("clash of clans ios app version on appstore", appVersion);
70+
})
71+
.catch(err => {
72+
console.log("error occurred", err);
73+
});
7574
```
7675

7776
### How To find an appid in IOS or packageId in Android
@@ -108,7 +107,6 @@ The area marked on red is the app's `packageId`
108107

109108
### Advanced Options
110109

111-
112110
```javascript
113111
getAppstoreAppVersion(identifier, options);
114112
```
@@ -119,28 +117,28 @@ getAppstoreAppVersion(identifier, options);
119117

120118
- `options` contains values which can affect the result obtained from the store
121119

122-
- `jquerySelector` [Android] is the dom element identifier (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=<app package id>` and parse `$('body > [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.
120+
- `jquerySelector` [Android] is the dom element identifier (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=<app package id>` and parse `$('body > [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.
123121

124-
- `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}`.
125-
Currently to get the ios version number from app store we hit the url `https://itunes.apple.com/lookup?id=<app id> ` by default.
126-
or we can also hit
127-
`https://itunes.apple.com/lookup?bundleId=<app bundle id>` if we pass typeOfId as `bundleId`.
128-
When we hit the above said urls we get json with all the info of the app.
122+
- `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}`.
129123

130-
- `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.
124+
Currently to get the ios version number from app store we hit the url `https://itunes.apple.com/lookup?id=<app id>` by default.
125+
or we can also hit
126+
`https://itunes.apple.com/lookup?bundleId=<app bundle id>` if we pass typeOfId as `bundleId`.
127+
When we hit the above said urls we get json with all the info of the app.
128+
129+
- `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.
131130

132131
**Example**
133132

134133
```javascript
135-
const storeSpecificId = Platform.OS === 'ios'
136-
? '529479190'
137-
: 'com.supercell.clashofclans'
134+
const storeSpecificId =
135+
Platform.OS === "ios" ? "529479190" : "com.supercell.clashofclans";
138136

139137
getAppstoreAppVersion(storeSpecificId, {
140-
jquerySelector: '[itemprop=\'softwareVersion\']',
141-
typeOfId: 'id',
142-
country: 'de'
143-
})
138+
jquerySelector: "[itemprop='softwareVersion']",
139+
typeOfId: "id",
140+
country: "de"
141+
});
144142
```
145143

146144
### Contributors
@@ -150,8 +148,10 @@ getAppstoreAppVersion(storeSpecificId, {
150148
- [Oleg Filimonov](https://github.com/olegfilimonov)
151149
- [Carlos](https://github.com/carl0395)
152150
- [EricH](https://github.com/jehartzog)
151+
- [Regan Langford](https://github.com/ReganL)
153152

154153
### License
154+
155155
MIT
156156

157157
© Atul R

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-appstore-version-checker",
3-
"version": "2.5.1",
3+
"version": "2.5.4",
44
"description": "A react native module to find the app version on play store and ios app store",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)