Reputation: 267
I'm attempting to set up a leave a review button for my Cordova application. I have a function calling when the button is tapped but I get no response. (Using TwoDots as a test)
function leaveAReview () {
window.open('https://itunes.apple.com/us/app/twodots/id880178264?mt=8&uo=4', 'itunes_store');
}
How can I get this working? Also, how can I set up the button to go to the review page for my app before the app has been released?
Upvotes: 1
Views: 354
Reputation: 15048
I'm aware that this is an old question but it's worth updating with awesome new possibility on iOS
10.3
Since iOS 10.3
you can make use of the awesome InAppReview from Apple. I can attest to the fact that this new way of reviewing apps has been very fruitful for our apps in terms of the number of reviews. You can read an even more compelling case study here of how Instagram doubled their reviews.
The cordova plugin, which is very easy to use and implement is here: https://github.com/omaxlive/com.omarben.inappreview.
For brevity, and in case that StackOverflow seize to exist (unlikely), here are the steps to use it:
Install the plugin: cordova plugins add com.omarben.inappreview
Call it in the code like this:
var requestReview = function(){
try{
var success = function() {
console.log("Success");
}
var failure = function() {
console.log("Error calling plugin");
}
inappreview.requestReview(success, failure);
}catch(e){
console.log("catch: "+e);
}
};
Hope this helps someone...
Upvotes: 0
Reputation: 12367
To link to the app, you can use this URL form:
itms-apps://itunes.apple.com/app/id{APP_ID}
It uses the itms-apps protocol to link directly to an app on the App Store and avoid redirects.
If you want to link directly to the review page, it appears that the only way is to use a URL in this form:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id={APP_ID}&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8
The bit about type=Purple+Software
is literal (not the name of your company); it appears to be a codename for iOS apps.
The {APP_ID}
for your application can be found in two places on iTunes Connect (even before you release your application or submit it for review).
The first is in the URL of the application in the "My Apps" section, which is in the form
https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/{APP_ID}
You can also find it on that page in the "General App Information" section right under your App Icon:
Upvotes: 2