2

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.

Community
  • 1
  • 1
Paul Metas
  • 254
  • 3
  • 19
  • I believed you already checked this question https://stackoverflow.com/questions/3124080/app-store-link-for-rate-review-this-app?rq=1 .I think you url is missing the `type=Purple+Software` part. – ljk321 Feb 20 '16 at 09:00
  • Re this comment in that thread? _Note - the "type=Purple+Software" has to be there and it has to be literally "Purple Software" - it's not the name of your company, it's a codename for iPhone applications :) I wasted an hour before I figured this out... – Kuba Suder Oct 24 '11 at 11:27_ .... do we think that this is still relevant? I guess if so, I will have to amend my above code to allow for both pre and post iOS7 (and iOS7) devices? – Paul Metas Feb 20 '16 at 09:09
  • 1
    Yeah. I've tried myself. The `"type=Purple+Software"` is actually crucial. Without it the link won't work. – ljk321 Feb 20 '16 at 09:10
  • I uploaded a new app about a week ago. So this is still relevant. At least for now. – ljk321 Feb 20 '16 at 09:11
  • I'm targeting iOS8+. I don't really know how the link behaves on iOS7 device and below. But I think it should also work, since that answer providing the link is over 6 years old. – ljk321 Feb 20 '16 at 09:14
  • So I should be using: `UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=\(111222333)&onlyLatestVersion=true&pageNumber=0&sortOrdering=1)")!);` for it to actually function? – Paul Metas Feb 20 '16 at 09:49
  • I believe so, as long as the `id=` part is OK. – ljk321 Feb 20 '16 at 10:04
  • `func jumpToAppStore(appId: String) { let url = "itms-apps://itunes.apple.com/app/id\(appId)" UIApplication.sharedApplication().openURL(NSURL(string: url)!) }` could also be a possible solution? – Paul Metas Feb 20 '16 at 10:11
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/104019/discussion-between-paul-satem-and-skyline75489). – Paul Metas Feb 20 '16 at 10:20
  • I haven't really tested on that one yet. – ljk321 Feb 20 '16 at 10:22
  • `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)")!);` ..... Thanks for your help :-) – Paul Metas Feb 20 '16 at 10:36

1 Answers1

3

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)")!);
}
Paul Metas
  • 254
  • 3
  • 19