Skip to content
cjbeauchamp edited this page Jul 23, 2013 · 10 revisions

This class is not specific to Kii Cloud and provides an easy way to implement the "Prompt for rating" dialog you may have seen in your favorite apps! This prompt happens automatically after a certain period of time has passed, and is very configurable - from the time contstraints to the messaging. Implement with only two lines of code and leverage this great tool to prompt your power users for feedback and even boost your rating in the app store.

Use the quick start guide to get the view controller in your app in a few short steps - or check out the customization section if you'd like to start to customize!

As always, you can find full documentation and edit the source within the KiiToolkit repository.

Working with KTAppRater


Screenshots

This is an example of the KTAppRater, and might look familiar from some of your favorite apps! Remember, all text in the view can be customized to your app, and the timing can also be configured.

[![Main View](images/KTAppRater/main.thumb.png "Main View")](images/KTAppRater/main.png)

Quick Start

Get KTAppRater implemented with its default settings in a few short minutes using the steps below.

1. Add KiiToolkit to your app (Skip this section if you already have the latest version of KiiToolkit in your application)

Follow the steps here to import the KiiToolkit and its dependencies into your app

2. Add the KTAppRater Code

Enter the following code to your AppDelegate.m file when your application is opened:

[KTAppRater configureAppID:@"MY_NUMERIC_ITUNES_APP_ID"];
[KTAppRater appOpened];

Which may end up looking something like:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  // Override point for customization after application launch.
  [KTAppRater configureAppID:@"MY_NUMERIC_ITUNES_APP_ID"];
  [KTAppRater appOpened];
  ...
  return YES;
}

3. Add your app id

MY_NUMERIC_ITUNES_APP_ID can be found in your app's page within your iTunes Connect portal. See the example below:

[![iTunes Connect](images/KTAppRater/itc.thumb.png "iTunes Connect")](images/KTAppRater/itc.png) **That's it! The library will take care of the rest**

Default Settings

Default Time Configurations

  • Minimum 5 days since first launch
  • Minimum 10 calls to KTAppRater#appOpened
  • Prompt won't be displayed for at least 2 days after 'Remind me Later' is tapped

Default Prompt Messaging:

Rate {{APP_NAME}}!

Thanks for using {{APP_NAME}}! If you enjoy it, would you mind giving it a 5-star rating on the app store? We'd really appreciate it!

Note: {{APP_NAME}} will be replaced by the bundle name (read by iOS) so no customization is needed.

Note2: We have heard from trusted sources that apps could potentially be reported for asking for a 5-star rating explicitly. We haven't seen this first-hand, but as you test your wording, keep this in mind!

If you'd like to change any of these parameters, check out the customization section below

Customization

The KTAppRater can be fully customized to fit your application. Other than being totally open-source, you can access the messaging and timing configurations for easy manipulation.

Here is an example of some of the customizations - see the documentation within the repository for all available methods:

Customize the messaging

// make sure the KTAppRater has already been configured (i.e. put this first)
[KTAppRater configureAppID:@"MY_NUMERIC_ITUNES_APP_ID"];

// start customization
[KTAppRater setAlertTitle:@"Rate my app :)"];
[KTAppRater setAlertMessage:@"We would love to hear what you have to say - leave us a review on iTunes!"];
// end customization

Customize the timing configuration

You can also customize the registration view by accessing its properties. This includes the ability to choose which text fields are displayed using a simple method as shown below. To modify the registration view, you must first access the object - which is easy because it's simply a property of the login view:

// make sure the KTAppRater has already been configured (i.e. put this first)
[KTAppRater configureAppID:@"MY_NUMERIC_ITUNES_APP_ID"];

// start customization

// wait 1 week before reminding the user after they
// have chosen "Remind me later"
[KTAppRater setDaysBeforeReminding:7];

// no minimum use count
[KTAppRater setMinimumUsesBeforeDisplay:-1];

// wait 1 day after first open before prompting
[KTAppRater setMinimumDaysBeforeDisplay:1];

// end customization

Count App Opens

In the quick start, we call the appOpened method within the application:didFinishLaunchingWithOptions: method in AppDelegate.m. This will increment the use count every time your app is initialized.

If you'd prefer to count uses as when your app is brought to the foreground (i.e. when the app is opened or brought to the front after being switched to), put the appOpened method in your AppDelegate.m as follows:

 - (void) applicationDidBecomeActive:(UIApplication *)application
{
  ...
  [KTAppRater appOpened];
  ...
}

Note: Of course, you can put this method anywhere you wish, these are just the most common use cases!