You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A react native module to check an app's version on playstore or ios app store.
8
6
This module can be used to check if your app has a new version on playstore or apple app store.
9
7
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 ;) )
30
28
31
29
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
32
30
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
35
33
36
34
2. Append the following lines to `android/settings.gradle`:
37
35
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
+
```
42
40
43
41
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
-`options` contains values which can affect the result obtained from the store
121
119
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.
123
121
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}`.
129
123
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.
0 commit comments