In App Link To Rate An App

馋奶兔 提交于 2019-12-11 00:59:38

问题


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:


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)")!);
}


来源:https://stackoverflow.com/questions/35519537/in-app-link-to-rate-an-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!