expo-store-review
Advanced tools
Comparing version
/** | ||
* Determine if the platform has the capabilities to use `requestedReview` | ||
* - iOS: `true` if iOS 10.3 or greater and the StoreKit framework is linked | ||
* - Android: `true` if Android 5.0 or greater and PlayStore is installed | ||
* - web: Always `false` | ||
* Determines if the platform has the capabilities to use `StoreReview.requestReview()`. | ||
* @return | ||
* This returns a promise fulfills with `boolean`, depending on the platform: | ||
* - On iOS, it will resolve to `true` if the device is running iOS 10.3+. | ||
* - On Android, it will resolve to `true` if the device is running Android 5.0+. | ||
* - On Web, it will resolve to `false`. | ||
*/ | ||
export declare function isAvailableAsync(): Promise<boolean>; | ||
/** | ||
* Use the iOS `SKStoreReviewController` or Android `ReviewManager` API | ||
* to prompt a user rating without leaving the app. | ||
* In ideal circumstances this will open a native modal and allow the user to select a star rating | ||
* that will then be applied to the App Store, without leaving the app. If the device is running | ||
* a version of iOS lower than 10.3, or a version of Android lower than 5.0, this will attempt | ||
* to get the store URL and link the user to it. | ||
*/ | ||
export declare function requestReview(): Promise<void>; | ||
/** | ||
* Get your app's store URLs from `app.config.js` or `app.json`: | ||
* - iOS: https://docs.expo.io/versions/latest/workflow/configuration#appstoreurlurl-to-your-app-on-the-apple-app-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - Android: https://docs.expo.io/versions/latest/workflow/configuration#playstoreurlurl-to-your-app-on-the-google-play-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - web: returns `null` | ||
* This uses the `Constants` API to get the `Constants.manifest.ios.appStoreUrl` on iOS, or the | ||
* `Constants.manifest.android.playStoreUrl` on Android. | ||
* | ||
* On Web this will return `null`. | ||
*/ | ||
export declare function storeUrl(): string | null; | ||
/** | ||
* A flag to detect if this module can do anything. | ||
* @return This returns a promise that fulfills to `true` if `StoreReview.requestReview()` is capable | ||
* directing the user to some kind of store review flow. If the app config (`app.json`) does not | ||
* contain store URLs and native store review capabilities are not available then the promise | ||
* will fulfill to `false`. | ||
* | ||
* # Example | ||
* ```ts | ||
* if (await StoreReview.hasAction()) { | ||
* // you can call StoreReview.requestReview() | ||
* } | ||
* ``` | ||
*/ | ||
export declare function hasAction(): Promise<boolean>; |
@@ -5,7 +5,10 @@ import { Platform } from '@unimodules/core'; | ||
import StoreReview from './ExpoStoreReview'; | ||
// @needsAudit | ||
/** | ||
* Determine if the platform has the capabilities to use `requestedReview` | ||
* - iOS: `true` if iOS 10.3 or greater and the StoreKit framework is linked | ||
* - Android: `true` if Android 5.0 or greater and PlayStore is installed | ||
* - web: Always `false` | ||
* Determines if the platform has the capabilities to use `StoreReview.requestReview()`. | ||
* @return | ||
* This returns a promise fulfills with `boolean`, depending on the platform: | ||
* - On iOS, it will resolve to `true` if the device is running iOS 10.3+. | ||
* - On Android, it will resolve to `true` if the device is running Android 5.0+. | ||
* - On Web, it will resolve to `false`. | ||
*/ | ||
@@ -15,5 +18,8 @@ export async function isAvailableAsync() { | ||
} | ||
// @needsAudit | ||
/** | ||
* Use the iOS `SKStoreReviewController` or Android `ReviewManager` API | ||
* to prompt a user rating without leaving the app. | ||
* In ideal circumstances this will open a native modal and allow the user to select a star rating | ||
* that will then be applied to the App Store, without leaving the app. If the device is running | ||
* a version of iOS lower than 10.3, or a version of Android lower than 5.0, this will attempt | ||
* to get the store URL and link the user to it. | ||
*/ | ||
@@ -41,7 +47,8 @@ export async function requestReview() { | ||
} | ||
// @needsAudit | ||
/** | ||
* Get your app's store URLs from `app.config.js` or `app.json`: | ||
* - iOS: https://docs.expo.io/versions/latest/workflow/configuration#appstoreurlurl-to-your-app-on-the-apple-app-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - Android: https://docs.expo.io/versions/latest/workflow/configuration#playstoreurlurl-to-your-app-on-the-google-play-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - web: returns `null` | ||
* This uses the `Constants` API to get the `Constants.manifest.ios.appStoreUrl` on iOS, or the | ||
* `Constants.manifest.android.playStoreUrl` on Android. | ||
* | ||
* On Web this will return `null`. | ||
*/ | ||
@@ -60,4 +67,15 @@ export function storeUrl() { | ||
} | ||
// @needsAudit | ||
/** | ||
* A flag to detect if this module can do anything. | ||
* @return This returns a promise that fulfills to `true` if `StoreReview.requestReview()` is capable | ||
* directing the user to some kind of store review flow. If the app config (`app.json`) does not | ||
* contain store URLs and native store review capabilities are not available then the promise | ||
* will fulfill to `false`. | ||
* | ||
* # Example | ||
* ```ts | ||
* if (await StoreReview.hasAction()) { | ||
* // you can call StoreReview.requestReview() | ||
* } | ||
* ``` | ||
*/ | ||
@@ -64,0 +82,0 @@ export async function hasAction() { |
@@ -11,2 +11,6 @@ # Changelog | ||
## 4.0.1 — 2021-04-01 | ||
_This version does not introduce any user-facing changes._ | ||
## 4.0.0 — 2021-03-10 | ||
@@ -13,0 +17,0 @@ |
{ | ||
"name": "expo-store-review", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "ExpoStoreReview standalone module", | ||
@@ -35,3 +35,3 @@ "main": "build/StoreReview.js", | ||
}, | ||
"gitHead": "5b57d1fd0a20294c1dec7c43b5df34dd6425d1a5" | ||
"gitHead": "58483c5ec15ae7ed7faba45b68993be5117685db" | ||
} |
@@ -7,7 +7,10 @@ import { Platform } from '@unimodules/core'; | ||
// @needsAudit | ||
/** | ||
* Determine if the platform has the capabilities to use `requestedReview` | ||
* - iOS: `true` if iOS 10.3 or greater and the StoreKit framework is linked | ||
* - Android: `true` if Android 5.0 or greater and PlayStore is installed | ||
* - web: Always `false` | ||
* Determines if the platform has the capabilities to use `StoreReview.requestReview()`. | ||
* @return | ||
* This returns a promise fulfills with `boolean`, depending on the platform: | ||
* - On iOS, it will resolve to `true` if the device is running iOS 10.3+. | ||
* - On Android, it will resolve to `true` if the device is running Android 5.0+. | ||
* - On Web, it will resolve to `false`. | ||
*/ | ||
@@ -18,5 +21,8 @@ export async function isAvailableAsync(): Promise<boolean> { | ||
// @needsAudit | ||
/** | ||
* Use the iOS `SKStoreReviewController` or Android `ReviewManager` API | ||
* to prompt a user rating without leaving the app. | ||
* In ideal circumstances this will open a native modal and allow the user to select a star rating | ||
* that will then be applied to the App Store, without leaving the app. If the device is running | ||
* a version of iOS lower than 10.3, or a version of Android lower than 5.0, this will attempt | ||
* to get the store URL and link the user to it. | ||
*/ | ||
@@ -45,7 +51,8 @@ export async function requestReview(): Promise<void> { | ||
// @needsAudit | ||
/** | ||
* Get your app's store URLs from `app.config.js` or `app.json`: | ||
* - iOS: https://docs.expo.io/versions/latest/workflow/configuration#appstoreurlurl-to-your-app-on-the-apple-app-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - Android: https://docs.expo.io/versions/latest/workflow/configuration#playstoreurlurl-to-your-app-on-the-google-play-store-if-you-have-deployed-it-there-this-is-used-to-link-to-your-store-page-from-your-expo-project-page-if-your-app-is-public | ||
* - web: returns `null` | ||
* This uses the `Constants` API to get the `Constants.manifest.ios.appStoreUrl` on iOS, or the | ||
* `Constants.manifest.android.playStoreUrl` on Android. | ||
* | ||
* On Web this will return `null`. | ||
*/ | ||
@@ -64,4 +71,15 @@ export function storeUrl(): string | null { | ||
// @needsAudit | ||
/** | ||
* A flag to detect if this module can do anything. | ||
* @return This returns a promise that fulfills to `true` if `StoreReview.requestReview()` is capable | ||
* directing the user to some kind of store review flow. If the app config (`app.json`) does not | ||
* contain store URLs and native store review capabilities are not available then the promise | ||
* will fulfill to `false`. | ||
* | ||
* # Example | ||
* ```ts | ||
* if (await StoreReview.hasAction()) { | ||
* // you can call StoreReview.requestReview() | ||
* } | ||
* ``` | ||
*/ | ||
@@ -68,0 +86,0 @@ export async function hasAction(): Promise<boolean> { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24807
7.53%243
25.91%