In App Link To Rate An App

2019-07-17 15:59发布

I realise this has been a heavy traffic question over the past few years.

I have looked at every question and answer, and every comment and re-comment. Answers and comments are wide in range. Apple are famous for changing the landscape continuously.

I would just like the most updated method to allow the user to rate my app via a button in-app.

This is what I have as the most updated version:

@IBAction func RateUs(sender: AnyObject) {
  UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=\(111222333)&onlyLatestVersion=true&pageNumber=0&sortOrdering=1)")!);
}

where 111222333 is my app ID.

Is this correct? I am about to submit my app for review and need to use what is currently accepted by Apple. Thanks!

Edit:

Possible modification to:

UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?‌​type=Purple+Software&id=\(111222333)&onlyLatestVersion=true&pageNumber=0&sortOrde‌​ring=1)")!);

incorporating: type=Purple+Software (as per kind suggestion in comment below).

Or perhaps I should try:

func jumpToAppStore(appId: String) {
let url = "itms-apps://itunes.apple.com/app/id\(appId)"
UIApplication.sharedApplication().openURL(NSURL(string: url)!)

}

as per an accepted answer here : App store link for "rate/review this app" dated Aug 20, 2015.

1条回答
祖国的老花朵
2楼-- · 2019-07-17 16:30

After additional searches, re-searches and helpful comments, I have amended my code to:

@IBAction func RateUs(sender: AnyObject) {
  UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=\(1081797746)&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software)")!);
}
查看更多
登录 后发表回答