How to get people to rate your IOS app

  • このエントリーをはてなブックマークに追加
  • iPhone

How to display UIAlert like “Rate this application” when application starts.


You should write about UIAlert to didFinishLaunchingWithOptions.

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    CGRect frameForWindow = [[UIScreen mainScreen] bounds];
    window = [[UIWindow alloc] initWithFrame:frameForWindow];

    //write about window

    [window addSubview:navigationController.view];

    //From here about UIAlert and rating popup.
    //manage displaying UIAlert by NSUserDefaults
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    NSInteger executeTime = [userDefaults integerForKey: @"executeTime"];
    NSInteger alertDispFlag = [userDefaults integerForKey: @"alertDispFlag"];


    //If this application is started 6 times or more and alertDispFlag == 0, then alert is displayed.
    if (executeTime > 5 && alertDispFlag == 0) {
        // アラート表示

        UIAlertView *alertView = [[UIAlertView alloc] init];
        alertView.delegate = self;
        alertView.title=NSLocalizedString(@"pleaseReview", @"Please Rate");
        alertView.message=NSLocalizedString(@"appliciate", @"Please Rate this apps.");
        [alertView addButtonWithTitle:NSLocalizedString(@"Review", @"Rate now.")];
        [alertView addButtonWithTitle:NSLocalizedString(@"Later", @"Remind me later.")];
        [alertView addButtonWithTitle:NSLocalizedString(@"nothanks", @"No, thanks.")];
        [alertView show];
        [alertView release];


    [userDefaults setInteger:executeTime forKey: @"executeTime"];
    [userDefaults synchronize];

    return YES;

//delegate to UIAlret

clickedButtonAtIndex:(NSInteger)buttonIndex {

    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    switch (buttonIndex) {
        case 0:
            //go to rate page
            [userDefaults setInteger: 1 forKey: @"alertDispFlag"];
            [userDefaults synchronize];
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:NSLocalizedString(@"reviewURL", @"") ]];

        case 1:

        case 2:
            [userDefaults setInteger: 1 forKey: @"alertDispFlag"];
            [userDefaults synchronize];


review URL is

itms-apps:// digit itunes app id)&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software

One Response to “How to get people to rate your IOS app”

Leave a Reply

© 2018 samurai-apps. All rights reserved. Powered by WordPress Entries RSS Comments RSS