Tutorial: “Write a Review” / “Rate Us”

Rate and ReviewUser ratings play a huge role in where your app ranks on Apples Top Charts lists, and it influences new users who are considering downloading your app. Yet it’s often tough to get users to rate your app, because without reminding them and making it really simple they most likely will not review your app. The only exception to this is the user who only wants to criticize your app or the die hard fans of the app. The largest user segmentation you have is the users who like your app and these users are the ones we need to remind.

There is also a problem of misuse in regards to ratings. Often users who don’t know better will use the review along with a low rating in an attempt to get tech support from a developer. This is flawed for everyone involved; it lowers the rating of the app, scares away new users, and worst of all, as a developer we have no way to get in touch with users who rate our app.

Below is the code that belongs in your – (void)viewDidLoad or – (void)viewWillAppear methods. It checks to see how many times the user has launched the app and increments it by 1. If the launch counter is equal to 3, 9, 15, or 21 we’ll show the Rate App alert message unless “neverRate” equals to YES.

    NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
    //Ask for Rating
    BOOL neverRate = [prefs boolForKey:@"neverRate"];

    int launchCount = 0;
    //Get the number of launches
    launchCount = [prefs integerForKey:@"launchCount"];
    launchCount++;
    [[NSUserDefaults standardUserDefaults] setInteger:launchCount forKey:@"launchCount"];
    
    if (!neverRate)
    {
        if ( (launchCount == 3) || (launchCount == 9) || (launchCount == 15) || (launchCount == 21) )
        {
            [self rateApp];
        }
    }
    [prefs synchronize];

When we ask the user if they would like to rate the app it’s good to give them three options “Rate It Now”, “Remind Me Later” and “No, Thanks”. If the user selects one of the first or last then we’ll set NSUserDefaults to YES so the user will never see the alert again. If they select “Maybe Later” we’ll show it to them again in the future.

- (void)rateApp {   
    BOOL neverRate = [[NSUserDefaults standardUserDefaults] boolForKey:@"neverRate"];
    
    if (neverRate != YES) {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please rate !"
                                                        message:@"If you like it we'd like to know."
                                                       delegate:self
                                              cancelButtonTitle:nil
                                              otherButtonTitles:@"Rate It Now", @"Remind Me Later", @"No, Thanks", nil];
        alert.delegate = self;
        [alert show];
    }
}

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 0) {
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"neverRate"];
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=573753324"]]];
    }
    
    else if (buttonIndex == 1) {
        
    }

    else if (buttonIndex == 2) {
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"neverRate"];
    }
}

If the user selects “Rate” they will be redirected to your app within the App Store, and the Rates & Reviews section already opened. To make it go to your app, change “573753324″ in the code above to point to your unique app id within iTunes Connect. If you leave it as is your users will be directed to my Travel Bomb app, I could use some reviews!
how_many_reviews_do_ios_developers_have