iOS Life

  • Home
  • ABOUT
  • SERVICES
  • PORTFOLIO
  • BLOG
  • Contact

Tutorial: Write a Review / Rate Us

User 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

May 29, 2013 Brian Coleman
News: iOS7 RumorsMy First Hackathon
You Might Also Like
 
iOS7, We’ve Got A Problem
 
tvOS Tutorial: Top Shelf in Swift
9 years ago Tutorialsios, objective-c, tutorial5,619
Follow Me
    
Categories
  • About Me
  • Frameworks
  • My Apps
  • News
  • Strategy
  • Swift
  • Tools
  • Tutorials
  • tvOS
  • Uncategorized
  • Videos
  • Watch
Archives
  • May 2016
  • January 2016
  • October 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
brianjcoleman on Twitter
  • Classix is still holding in the top charts on Apple TV in Canada. #55 Free, #23 Top Grossing. #tvos #appletv #app https://t.co/xuEJiT4rro, Jul 14
  • New Blog Post: "Classix for iPhone, iPad & Apple TV” #iOSDev #ios #swift #swiftlang #SwiftDevs #AppleTV Read here: https://t.co/uF6w3gYOot, May 20
  • New Blog Post: "How to test your app for IPv6 compatibility” #iOSDev #ios #swift #swiftlang #SwiftDevs Read here: https://t.co/SveichSUep, May 6

Recent Posts
  • Classix for iPhone, iPad & Apple TV
  • Tutorial: How to test your app for IPv6 compatibility
  • Tutorial: Testing SSL using Charles Proxy on an iOS Device
  • Tutorial: 3D Touch – Quick Actions in Swift
  • tvOS Tutorial: Top Shelf in Swift
Featured Apps
Classix
Sportsnet
TAGS
tutorialswiftios8iosobjective-cvideostrategygamesframeworknewsappsmonitizeios7applefacebookwatchtoolstvosios9bookdesignsocialapiprovisiontutorialsbooksiapiTunes ConnectIPv6
Search
ABOUT
Brian is a Lead iOS/tvOS Developer from Toronto with over 18 years of multifaceted experience including development, design, business analysis and project management.
MOST VIEWED
Tutorial: How To Use Login in Facebook SDK 4.1.x for Swift
163,489 views
Tutorial: How to test your app for IPv6 compatibility
102,074 views
Tutorial: How to use Auto Layout in Xcode 6
89,234 views
FOLLOW ME
    
Email Subscription
Sign up for my newsletter to receive the latest news and tutorials posted.

Enter your email address:

2013-2017 © Brian Coleman