1

I have heard that iOS7 allows users to rate and review an app within that app, avoiding the need to redirect to appstore and leaving the app. So far, I have only found the difference in the URL links for the rate feature in itunes as mentioned in ITunes review URL and iOS 7 (ask user to rate our app) AppStore show a blank page, but not how to stay inside the app.

I'm using Appirater in my app and integrated the new url and app goes to appstore for rate/review.

Can anybody tell me if this new feature is there and how to implement it?

Community
  • 1
  • 1
Sundus Alamovic
  • 322
  • 2
  • 18

2 Answers2

4

I think you're looking for the SKProductViewController.

You can present a SKProductViewController with the following code:

NSDictionary *parameters = [NSDictionary dictionaryWithObject:@"YOURITUNESAPPID" forKey:SKStoreProductParameterITunesItemIdentifier];

SKProductViewController *productViewController = [[SKProductViewController alloc] init];
[self presentViewController:productViewController animated:YES completion:nil]];

This assumes that you're in a UIViewController subclass and know your iTunes application identifier. This will display a model viewController displaying the AppStore entry for that application.

Users are able leave ratings from that viewController. Haven't been able to write a review though.

Glenn
  • 1,085
  • 1
  • 9
  • 13
  • 2
    This does not work, Apple has disabled the possibility to review apps using `SKProductViewController` in iOS 7. – mattsson Jan 07 '14 at 14:54
  • 1
    You are not using the `parameters` variable in your example – Sunkas Jan 16 '14 at 19:31
  • @mattsson you're correct, I just unfortunately found out that the 'Write a Review' button isn't enabled. Would've been awesome if it was enabled :( – klcjr89 Mar 18 '14 at 18:44
2

I had the same issue using Appirater, I have partially solved the proplem in this way

define the template for iOS7:

NSString *templateReviewURLiOS7 = @"itms-apps://itunes.apple.com/app/idAPP_ID";

make this chnges on the rateApp method

+ (void)rateApp {

    .
    .
    .

// this URL Scheme should work in the iOS 6 App Store in addition to older stores
NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]];

   // iOS 7 needs a different templateReviewURL @see https://github.com/arashpayan/appirater/issues/131
   if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
       reviewURL = [templateReviewURLiOS7 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]];
   }

    .
    .
    .
}

this will open the rate page in iOS6 as was in the past, and the app page in iOS7

Fran Sevillano
  • 8,103
  • 4
  • 31
  • 45
Manu
  • 788
  • 5
  • 10