UNPKG

2.05 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8var plugin_1 = require('./plugin');
9/**
10 * @name LaunchReview
11 * @description
12 *
13 * This launches the native store app in order for the user to leave a review.
14 * On Android, the plugin opens the the app's storepage in the Play Store where the user can leave a review by pressing the stars to give a rating.
15 * On iOS, the plugin opens the app's storepage in the App Store and focuses the Review tab, where the user can leave a review by pressing "Write a review".
16 *
17 * @usage
18 * ```
19 * import { LaunchReview } from 'ionic-native';
20 *
21 * const appId: string = 'yourAppId';
22 * LaunchReview.launch(appId)
23 * .then(() => console.log('Successfully launched store app');
24 * ```
25 */
26var LaunchReview = (function () {
27 function LaunchReview() {
28 }
29 /**
30 * Launch store app using given app ID
31 * @returns {Promise<void>}
32 */
33 LaunchReview.launch = function (appId) { return; };
34 __decorate([
35 plugin_1.Cordova()
36 ], LaunchReview, "launch", null);
37 LaunchReview = __decorate([
38 plugin_1.Plugin({
39 pluginName: 'LaunchReview',
40 plugin: 'cordova-launch-review',
41 pluginRef: 'LaunchReview',
42 repo: 'https://github.com/dpa99c/cordova-launch-review',
43 platforms: ['Android', 'iOS']
44 })
45 ], LaunchReview);
46 return LaunchReview;
47}());
48exports.LaunchReview = LaunchReview;
49//# sourceMappingURL=launch-review.js.map
\No newline at end of file