Cordova Plugin that use the iOS class SKStoreReviewController to open the inapp review popup available since iOS 10.3
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
inappreview.requestReview(success, failure);
More detailed example:
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);
}
};
npm install @ionic-native/in-app-review --save
import { InAppReview } from '@ionic-native/in-app-review';
@NgModule({
providers: [
InAppReview
]
})
export class AppModule { }
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));
Apple is also limiting the amount of times developers can ask customers for reviews. Developers will only be able to bring up the review dialog three times a year. If a customer has rated the app, they will not be prompted again. If a customer has dismissed the review prompt three times, they will not be asked to review the app for another year. More: http://www.loopinsight.com/2017/01/24/apple-explains-the-new-app-reviews-api-for-developers/
Note When you call this method while your app is still in development mode, a rating/review request view is always displayed so that you can test the user interface and experience. However, this method has no effect when you call it in an app that you distribute using TestFlight.
inappreview plugin was created by Omar Ben brahim.
inappreview is available under the MIT license. See the LICENSE file for more info.