cordova-plugin-app-review
Advanced tools
Comparing version 2.0.3 to 2.1.0
{ | ||
"name": "cordova-plugin-app-review", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Cordova plugin to review app", | ||
"types": "./types/index.d.ts", | ||
"cordova": { | ||
@@ -34,5 +35,14 @@ "id": "cordova-plugin-app-review", | ||
"scripts": { | ||
"version": "perl -p -i -e 's/(version=)\"\\d+\\.\\d+\\.\\d+\"/$1\"'$npm_package_version'\"$2/' plugin.xml && git add plugin.xml", | ||
"postversion": "git push && git push --tags" | ||
"preversion": "npm run docs && npm run apidocs && rm -rf ./docs", | ||
"version": "perl -i -pe 's/(version=)\"\\d+\\.\\d+\\.\\d+\"/$1\"'$npm_package_version'\"$2/' plugin.xml && git add plugin.xml README.md", | ||
"postversion": "git push && git push --tags", | ||
"docs": "typedoc --hideBreadcrumbs --hideInPageTOC --entryPointStrategy packages .", | ||
"preapidocs": "perl -i -0pe 's/<!-- TypedocGenerated -->.*//gms' README.md", | ||
"apidocs": "cat ./docs/interfaces/AppReviewPlugin.md >> README.md", | ||
"postapidocs": "perl -i -pe 's/# Interface.*/<!-- TypedocGenerated -->/' README.md" | ||
}, | ||
"devDependencies": { | ||
"typedoc": "^0.23.9", | ||
"typedoc-plugin-markdown": "^3.13.4" | ||
} | ||
} |
103
README.md
@@ -12,2 +12,9 @@ # cordova-plugin-app-review | ||
[npm-url]: https://www.npmjs.com/package/cordova-plugin-app-review | ||
[npm-version]: https://img.shields.io/npm/v/cordova-plugin-app-review.svg | ||
[npm-downloads]: https://img.shields.io/npm/dm/cordova-plugin-app-review.svg | ||
[twitter-url]: https://twitter.com/chemerisuk | ||
[twitter-follow]: https://img.shields.io/twitter/follow/chemerisuk.svg?style=social&label=Follow%20me | ||
[donate-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z9FRHXAYSQ8BL&source=url | ||
## Index | ||
@@ -32,44 +39,82 @@ | ||
Use variable `ANDROID_PLAY_CORE_VERSION` to override dependency version on Android: | ||
Use variable `ANDROID_PLAY_REVIEW_VERSION` to override dependency version on Android: | ||
$ cordova plugin add cordova-plugin-app-review --variable ANDROID_PLAY_CORE_VERSION='1.8.+' | ||
$ cordova plugin add cordova-plugin-app-review --variable ANDROID_PLAY_REVIEW_VERSION='2.0.+' | ||
<!-- TypedocGenerated --> | ||
## Methods | ||
Most of time you can just use a boilerplate below to trigger the inapp review dialog and fallback to app/play store screen when the dialog wasn't displayed: | ||
```js | ||
cordova.plugins.AppReview.requestReview().catch(function() { | ||
return cordova.plugins.AppReview.openStoreScreen(); | ||
}); | ||
``` | ||
### requestReview() | ||
Launches inapp review dialog. | ||
```js | ||
cordova.plugins.AppReview.requestReview(); | ||
### openStoreScreen | ||
▸ **openStoreScreen**(`packageName?`): `Promise`<`void`\> | ||
Launches App/Play store page with a review form. By default current app screen | ||
is displayed but you can pass a package name string to show another app details. | ||
**`Example`** | ||
```ts | ||
cordova.plugins.AppReview.openStoreScreen(); | ||
cordova.plugins.AppReview.openStoreScreen("com.app.example"); | ||
``` | ||
#### Parameters | ||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `packageName?` | `string` | Package name to show instead of the current app. | | ||
#### Returns | ||
`Promise`<`void`\> | ||
Callback when operation is completed | ||
#### Defined in | ||
[index.d.ts:41](https://github.com/chemerisuk/cordova-plugin-app-review/blob/e2df19b/types/index.d.ts#L41) | ||
___ | ||
### requestReview | ||
▸ **requestReview**(): `Promise`<`void`\> | ||
Launches in-app review dialog. | ||
IOS notes: | ||
- Supported iOS 10.3+ only | ||
- iOS limits the frequency of displaying The Rating dialog | ||
* Supported iOS 10.3+ only. | ||
* [iOS limits the frequency of displaying The Rating dialog](https://developer.apple.com/design/human-interface-guidelines/ios/system-capabilities/ratings-and-reviews/#system-rating-and-review-prompts). | ||
Android notes: | ||
- After the account on the device has downloaded the app at least once from the | ||
internal test track and is part of the testers list, you can deploy new | ||
versions of the app via cordova cli and call `requestReview` in debug mode | ||
- In-app reviews require your app to be published in Play Store | ||
- Google Play enforces a quota on how often a user can be shown the review dialog | ||
* **After the account on the device has downloaded the app at least once from the internal test track and is part of the testers list, you can deploy new versions of the app via cordova cli and call `requestReview` in debug mode**. | ||
* In-app reviews require your app to be published in Play Store. | ||
* [Google Play enforces a quota on how often a user can be shown the review dialog](https://developer.android.com/guide/playcore/in-app-review#quotas). | ||
**`See`** | ||
### openStoreScreen(_packageName_) | ||
Launches App/Play store page with a review form | ||
```js | ||
cordova.plugins.AppReview.openStoreScreen(); | ||
- [https://developer.apple.com/design/human-interface-guidelines/ios/system-capabilities/](https://developer.apple.com/design/human-interface-guidelines/ios/system-capabilities/) | ||
- [https://developer.android.com/guide/playcore/in-app-review#quotas](https://developer.android.com/guide/playcore/in-app-review#quotas) | ||
**`Example`** | ||
```ts | ||
cordova.plugins.AppReview.requestReview(); | ||
// request dialog and provide fallback | ||
cordova.plugins.AppReview.requestReview().catch(function() { | ||
return cordova.plugins.AppReview.openStoreScreen(); | ||
}); | ||
``` | ||
By default current app screen is displayed. Optionally you can pass a package name string to show another app details. | ||
#### Returns | ||
[npm-url]: https://www.npmjs.com/package/cordova-plugin-app-review | ||
[npm-version]: https://img.shields.io/npm/v/cordova-plugin-app-review.svg | ||
[npm-downloads]: https://img.shields.io/npm/dm/cordova-plugin-app-review.svg | ||
[twitter-url]: https://twitter.com/chemerisuk | ||
[twitter-follow]: https://img.shields.io/twitter/follow/chemerisuk.svg?style=social&label=Follow%20me | ||
[donate-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z9FRHXAYSQ8BL&source=url | ||
`Promise`<`void`\> | ||
Callback when operation is completed | ||
#### Defined in | ||
[index.d.ts:28](https://github.com/chemerisuk/cordova-plugin-app-review/blob/e2df19b/types/index.d.ts#L28) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15590
12
109
119
2