Question

How do I add a rating alert view inside my app for the user to choose how many stars?

Then I want to give the user some coins/reward if he or she rated with 5 stars.

What I have tried:

SKStoreProductViewController *productViewController = [[SKStoreProductViewController alloc] init];
[productViewController loadProductWithParameters:@{ SKStoreProductParameterITunesItemIdentifier : @364709193 } // which is the iBook app id
                                 completionBlock:^(BOOL result, NSError *error) {
                                     // giving me an error:
                                     // Error Domain=SKErrorDomain Code=5 "Cannot connect to iTunes Store" UserInfo=0xa71cd90 {NSLocalizedDescription=Cannot connect to iTunes Store}
                                 }];
productViewController.delegate = self;
[self presentViewController:productViewController animated:YES completion:nil];

But it only shows a blank screen with a cancel button. Also giving me the error:

Error Domain=SKErrorDomain Code=5 "Cannot connect to iTunes Store" UserInfo=0xa71cd90 {NSLocalizedDescription=Cannot connect to iTunes Store}

EDIT:

What I wanted was something like this: enter image description here

Was it helpful?

Solution 2

According to Apple, it is forbidden to ask user to rate the app with 5 stars. You could be rejected for doing so even after being approved.

However, You can ask the user to rate the app if he likes it. This is kind of the same thing but it's fine by Apple.

Next thing you have to know is that you cannot know if the user have rated the app and how many stars he gave it. What you could do is assume he has rated the app with good one and give him something in return (actually just for clicking the "Rate" button inside your app) because he pushed the "Rate" button only if he likes it. Another recommendation is to do that after the user have spent some time in the app (for example played more than 5 games in a row).

OTHER TIPS

This is a Very Bad Idea™. Not only it's completely unethical, it's also forbidden by App Store Review Guidelines (item 3.10).

EDIT: Apparently, now the document is under NDA, though it used to be public.

When testing the app, you are using what Apple calls the Sandbox iTunes store, not the actual store. This means not everything works as expected. This often (always?) returns an error when testing on the simulator.

However, I don't think what you are trying to do is possible (and is probably against Apple's TOS). The completion block won't give you any information on what the user did while using the SKStoreProductViewController.

I assume you are getting this error only when running on a device, apps are kept in a sandbox hence you should create a test user for it.

Open itunesconnect -> Manage Users -> Test User -> Add New User.

While you cannot manipulate the Apple Rating system; You can however create your own online rating system, perhaps to display on your own website. If a user gives the custom/online rating 5 stars, then that would be appropriate to reward them with whatever you like. Also, I am sure others would agree this would be a more "ethical" way.

Something like draw something popup is allowed as it doesn't have any reward for rating the app.

However, some of the best rated apps (even if they are trash apps) like this one are giving you popup rating windows. In this app you get asked several times to rate the app with 5 stars for 200 coins.

If you keep rejecting the option to rate the app, eventually you don't have to and you still get the coins. But message is, people are usually sheep, and will usually rate it at 5 stars to stop the pop up.

The App I linked to above is a great example of how trash apps or re-skinned apps that have 500+ similar copies can be on top of the App Store and on top for keywords like "free games" and "new games".

On the other hand I understand what the developers are doing as AppStore is becoming place where it's impossible to make something without big budgets spent in paid marketing (downloads)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top