expo-store-review 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/android/build.gradle +3 -3
- package/build/StoreReview.d.ts +2 -2
- package/build/StoreReview.d.ts.map +1 -1
- package/build/StoreReview.js +7 -13
- package/build/StoreReview.js.map +1 -1
- package/package.json +2 -2
- package/src/StoreReview.ts +7 -11
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 6.3.0 — 2023-05-08
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 6.2.1 — 2023-02-09
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
20
|
+
|
|
13
21
|
## 6.2.0 — 2023-02-03
|
|
14
22
|
|
|
15
23
|
### 💡 Others
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
# Installation in managed Expo projects
|
|
11
11
|
|
|
12
|
-
For [managed](https://docs.expo.dev/
|
|
12
|
+
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/storereview/).
|
|
13
13
|
|
|
14
14
|
# Installation in bare React Native projects
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ For bare React Native projects, you must ensure that you have [installed and con
|
|
|
18
18
|
### Add the package to your dependencies
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
-
expo install expo-store-review
|
|
21
|
+
npx expo install expo-store-review
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Configure for iOS
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '6.
|
|
6
|
+
version = '6.3.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -22,7 +22,7 @@ buildscript {
|
|
|
22
22
|
if (ext.has("kotlinVersion")) {
|
|
23
23
|
ext.kotlinVersion()
|
|
24
24
|
} else {
|
|
25
|
-
ext.safeExtGet("kotlinVersion", "1.
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.8.10")
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -74,7 +74,7 @@ android {
|
|
|
74
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
75
75
|
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
76
76
|
versionCode 4
|
|
77
|
-
versionName "6.
|
|
77
|
+
versionName "6.3.0"
|
|
78
78
|
}
|
|
79
79
|
lintOptions {
|
|
80
80
|
abortOnError false
|
package/build/StoreReview.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare function isAvailableAsync(): Promise<boolean>;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function requestReview(): Promise<void>;
|
|
16
16
|
/**
|
|
17
|
-
* This uses the `Constants` API to get the `Constants.
|
|
18
|
-
* `Constants.
|
|
17
|
+
* This uses the `Constants` API to get the `Constants.expoConfig.ios.appStoreUrl` on iOS, or the
|
|
18
|
+
* `Constants.expoConfig.android.playStoreUrl` on Android.
|
|
19
19
|
*
|
|
20
20
|
* On Web this will return `null`.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreReview.d.ts","sourceRoot":"","sources":["../src/StoreReview.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzD;AAGD;;;;GAIG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBnD;AAGD;;;;;GAKG;AACH,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"StoreReview.d.ts","sourceRoot":"","sources":["../src/StoreReview.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzD;AAGD;;;;GAIG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBnD;AAGD;;;;;GAKG;AACH,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAQxC;AAGD;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAElD"}
|
package/build/StoreReview.js
CHANGED
|
@@ -43,24 +43,18 @@ export async function requestReview() {
|
|
|
43
43
|
}
|
|
44
44
|
// @needsAudit
|
|
45
45
|
/**
|
|
46
|
-
* This uses the `Constants` API to get the `Constants.
|
|
47
|
-
* `Constants.
|
|
46
|
+
* This uses the `Constants` API to get the `Constants.expoConfig.ios.appStoreUrl` on iOS, or the
|
|
47
|
+
* `Constants.expoConfig.android.playStoreUrl` on Android.
|
|
48
48
|
*
|
|
49
49
|
* On Web this will return `null`.
|
|
50
50
|
*/
|
|
51
51
|
export function storeUrl() {
|
|
52
|
-
const
|
|
53
|
-
if (Platform.OS === 'ios' &&
|
|
54
|
-
return
|
|
52
|
+
const expoConfig = Constants.expoConfig;
|
|
53
|
+
if (Platform.OS === 'ios' && expoConfig?.ios) {
|
|
54
|
+
return expoConfig.ios.appStoreUrl ?? null;
|
|
55
55
|
}
|
|
56
|
-
else if (Platform.OS === '
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
else if (Platform.OS === 'android' && manifest?.android) {
|
|
60
|
-
return manifest.android.playStoreUrl ?? null;
|
|
61
|
-
}
|
|
62
|
-
else if (Platform.OS === 'android' && manifest2?.extra?.expoClient?.android) {
|
|
63
|
-
return manifest2.extra.expoClient.android.playStoreUrl ?? null;
|
|
56
|
+
else if (Platform.OS === 'android' && expoConfig?.android) {
|
|
57
|
+
return expoConfig.android.playStoreUrl ?? null;
|
|
64
58
|
}
|
|
65
59
|
return null;
|
|
66
60
|
}
|
package/build/StoreReview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreReview.js","sourceRoot":"","sources":["../src/StoreReview.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,cAAc;AACd;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,WAAW,CAAC,gBAAgB,EAAE,CAAC;AACxC,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,IAAI,WAAW,EAAE,aAAa,EAAE;QAC9B,MAAM,WAAW,CAAC,aAAa,EAAE,CAAC;QAClC,OAAO;KACR;IACD,6GAA6G;IAC7G,MAAM,GAAG,GAAG,QAAQ,EAAE,CAAC;IACvB,IAAI,GAAG,EAAE;QACP,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAChD,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,0DAA0D,EAAE,GAAG,CAAC,CAAC;SAC/E;aAAM;YACL,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAC5B;KACF;SAAM;QACL,iDAAiD;QACjD,OAAO,CAAC,IAAI,CACV,oKAAoK,CACrK,CAAC;KACH;AACH,CAAC;AAED,cAAc;AACd;;;;;GAKG;AACH,MAAM,UAAU,Q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AK,SAAS,IAAI,UAAU,EAAE,OAAO,EAAE;QAC3D,OAAO,UAAU,CAAC,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC;KAChD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,OAAO,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,gBAAgB,EAAE,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport * as Linking from 'expo-linking';\nimport { Platform } from 'expo-modules-core';\n\nimport StoreReview from './ExpoStoreReview';\n\n// @needsAudit\n/**\n * Determines if the platform has the capabilities to use `StoreReview.requestReview()`.\n * @return\n * This returns a promise fulfills with `boolean`, depending on the platform:\n * - On iOS, it will always resolve to `true`.\n * - On Android, it will resolve to `true` if the device is running Android 5.0+.\n * - On Web, it will resolve to `false`.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n return StoreReview.isAvailableAsync();\n}\n\n// @needsAudit\n/**\n * In ideal circumstances this will open a native modal and allow the user to select a star rating\n * that will then be applied to the App Store, without leaving the app. If the device is running\n * a version of Android lower than 5.0, this will attempt to get the store URL and link the user to it.\n */\nexport async function requestReview(): Promise<void> {\n if (StoreReview?.requestReview) {\n await StoreReview.requestReview();\n return;\n }\n // If StoreReview is unavailable then get the store URL from `app.config.js` or `app.json` and open the store\n const url = storeUrl();\n if (url) {\n const supported = await Linking.canOpenURL(url);\n if (!supported) {\n console.warn(\"Expo.StoreReview.requestReview(): Can't open store url: \", url);\n } else {\n await Linking.openURL(url);\n }\n } else {\n // If the store URL is missing, let the dev know.\n console.warn(\n \"Expo.StoreReview.requestReview(): Couldn't link to store, please make sure the `android.playStoreUrl` & `ios.appStoreUrl` fields are filled out in your `app.json`\"\n );\n }\n}\n\n// @needsAudit\n/**\n * This uses the `Constants` API to get the `Constants.expoConfig.ios.appStoreUrl` on iOS, or the\n * `Constants.expoConfig.android.playStoreUrl` on Android.\n *\n * On Web this will return `null`.\n */\nexport function storeUrl(): string | null {\n const expoConfig = Constants.expoConfig;\n if (Platform.OS === 'ios' && expoConfig?.ios) {\n return expoConfig.ios.appStoreUrl ?? null;\n } else if (Platform.OS === 'android' && expoConfig?.android) {\n return expoConfig.android.playStoreUrl ?? null;\n }\n return null;\n}\n\n// @needsAudit\n/**\n * @return This returns a promise that fulfills to `true` if `StoreReview.requestReview()` is capable\n * directing the user to some kind of store review flow. If the app config (`app.json`) does not\n * contain store URLs and native store review capabilities are not available then the promise\n * will fulfill to `false`.\n *\n * @example\n * ```ts\n * if (await StoreReview.hasAction()) {\n * // you can call StoreReview.requestReview()\n * }\n * ```\n */\nexport async function hasAction(): Promise<boolean> {\n return !!storeUrl() || (await isAvailableAsync());\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-store-review",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "ExpoStoreReview standalone module",
|
|
5
5
|
"main": "build/StoreReview.js",
|
|
6
6
|
"types": "build/StoreReview.d.ts",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"expo": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "4ba50c428c8369bb6b3a51a860d4898ad4ccbe78"
|
|
40
40
|
}
|
package/src/StoreReview.ts
CHANGED
|
@@ -47,21 +47,17 @@ export async function requestReview(): Promise<void> {
|
|
|
47
47
|
|
|
48
48
|
// @needsAudit
|
|
49
49
|
/**
|
|
50
|
-
* This uses the `Constants` API to get the `Constants.
|
|
51
|
-
* `Constants.
|
|
50
|
+
* This uses the `Constants` API to get the `Constants.expoConfig.ios.appStoreUrl` on iOS, or the
|
|
51
|
+
* `Constants.expoConfig.android.playStoreUrl` on Android.
|
|
52
52
|
*
|
|
53
53
|
* On Web this will return `null`.
|
|
54
54
|
*/
|
|
55
55
|
export function storeUrl(): string | null {
|
|
56
|
-
const
|
|
57
|
-
if (Platform.OS === 'ios' &&
|
|
58
|
-
return
|
|
59
|
-
} else if (Platform.OS === '
|
|
60
|
-
return
|
|
61
|
-
} else if (Platform.OS === 'android' && manifest?.android) {
|
|
62
|
-
return manifest.android.playStoreUrl ?? null;
|
|
63
|
-
} else if (Platform.OS === 'android' && manifest2?.extra?.expoClient?.android) {
|
|
64
|
-
return manifest2.extra.expoClient.android.playStoreUrl ?? null;
|
|
56
|
+
const expoConfig = Constants.expoConfig;
|
|
57
|
+
if (Platform.OS === 'ios' && expoConfig?.ios) {
|
|
58
|
+
return expoConfig.ios.appStoreUrl ?? null;
|
|
59
|
+
} else if (Platform.OS === 'android' && expoConfig?.android) {
|
|
60
|
+
return expoConfig.android.playStoreUrl ?? null;
|
|
65
61
|
}
|
|
66
62
|
return null;
|
|
67
63
|
}
|