I installed the ionic-native App Rate plugin and corresponding cordova-plugin for App Rate as well.
I want to prompt users to rate my app once they reach a certain page, so I have used the following constructor code on that page:
constructor(private appRate: AppRate, public navCtrl: NavController) {
this.appRate.preferences = {
openStoreInApp: true,
displayAppName: 'MYAPP',
promptAgainForEachNewVersion: false,
storeAppURL: {
ios: '#HERE',
android: 'market://details?id=ID.HERE'
},
customLocale: {
title: 'Do you enjoy MYAPP?',
message: 'If you enjoy using MYAPP, would you mind taking a moment to rate it? Without ratings I might not be able to afford groceries!',
cancelButtonLabel: 'No thanks, you can starve!',
laterButtonLabel: 'Remind Me Later',
rateButtonLabel: 'Rate Now'
},
callbacks: {
onButtonClicked: function(buttonIndex){
console.log("onButtonClicked -> " + buttonIndex);
}
}
};
this.appRate.promptForRating(false);
}
requestRating(){
this.appRate.promptForRating(true);
}
I redacted my Apple App ID # and Google Play package name, but I have them inserted correctly in my code. I ran the Android version in the simulator and it functioned as expected, linking to the Google Play store when a user clicks “Rate Now”.
The iOS Simulator, on the other hand, logs the following:
2017-09-19 17:23:12.229 PTL[19342:3526405] onButtonClicked -> 1
2017-09-19 17:23:13.158189-0400 PTL[19342:3526405] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/evan/Library/Developer/CoreSimulator/Devices/DD353090-6F2E-402C-992B-7C6664205D35/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-09-19 17:23:13.158580-0400 PTL[19342:3526405] [MC] Reading from private effective user settings.
Also, the network activity icon in the status bar spins and remains spinning until I quit the app, but the app functions normally during this time.
Is this an issue that will resolve itself once I move from simulator to live build? Has anyone had experience with this plugin?