Cordova Plugin that use the iOS class SKStoreReviewController to open the inapp review popup available since iOS 10.3
npm install com.omarben.inappreview
SKStoreReviewController: https://developer.apple.com/reference/storekit/skstorereviewcontroller?language=objc
Controls the process of requesting App Store ratings and reviews from users.
Overview
Use the requestReview method to indicate when it makes sense to ask the user for ratings and review within your app.
+ requestReview
Tells StoreKit to ask the user to rate or review your app, if appropriate.
cordova plugins add com.omarben.inappreview`npm url: https://www.npmjs.com/package/com.omarben.inappreview
How-to use example in your cordova project (iOS +10.3 only)
`
inappreview.requestReview(success, failure);
`More detailed example:
`javascript
var requestReview = function(){
try{
var success = function() {
console.log("success");
}
var failure = function() {
console.log("Error calling inappreview plugin");
}
inappreview.requestReview(success, failure);
}catch(e){
console.log("catch: "+e);
}
};
`Usage in ionic 2+
#### Install the Ionic Native package of this plugin
npm install @ionic-native/in-app-review --save
#### After installing a plugin’s package, add it to your app’s NgModule.
`typescriptimport { InAppReview } from '@ionic-native/in-app-review';
@NgModule({
providers: [
InAppReview
]
})
export class AppModule { }
`#### The use it in your page. Example:
`typescript
import { InAppReview } from '@ionic-native/in-app-review';
constructor(private inAppReview: InAppReview) { }
this.inAppReview.requestReview()
.then((res: any) => console.log(res))
.catch((error: any) => console.error(error));
``inappreview plugin was created by Omar Ben brahim.
inappreview is available under the MIT license. See the LICENSE file for more info.