-4

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

Rodrigo Ruiz
  • 4,248
  • 6
  • 43
  • 75
  • Yes, I asked that too =) – Rodrigo Ruiz Mar 06 '14 at 03:44
  • I suggest you don't ask for 5 star rating, but if you want to add a uialert for users to rate your app then look for iRate sample code on github. – Adrian P Mar 06 '14 at 03:57
  • Thank, but I did look into those (like Appirater for example). I just assumed that if my simple code above was not working, something else was wrong and Appirater wouldn't work either. – Rodrigo Ruiz Mar 06 '14 at 03:59
  • 1
    Offering something in return for a rating is a quick way to get your app rejected. – Caleb Jun 14 '14 at 14:23

6 Answers6

7

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Marcelo
  • 9,916
  • 3
  • 43
  • 52
  • 1
    I would remove the bit about "ethics" as that's subjective, while the relevant objective bit follows - it's against the TOS. Anyway, if you have insight into *why* the code fails (TOS violation aside), that should also be included in an answer. – user2864740 Mar 06 '14 at 03:24
  • Also, review guidelines are distributed under NDA w/ Apple. – JuJoDi Mar 06 '14 at 03:25
  • @JuJoDi Now that's just a load of poo :( Another reason for me to be a proud non-supporter of app stores, I suppose. – user2864740 Mar 06 '14 at 03:25
  • It is unfortunate for a situation like this, but Marcelo had to sign an NDA to access the link with the information that he posted and he should therefore honor it. – JuJoDi Mar 06 '14 at 03:27
  • 1
    It's not a job of SO to enforce NDAs. However, I'll edit my answer, as I haven't realized that the App Store Review Guidelines are now private (they used to be public). – Marcelo Mar 06 '14 at 03:29
  • That's why I edited my answer. But it's not Stack Overflow's job to ensure it. – Marcelo Mar 06 '14 at 03:31
  • Ah, well, there are plenty of resources online found when searching for .. "attempt to manipulate or cheat the user reviews or chart ranking" .. – user2864740 Mar 06 '14 at 03:32
  • @MarceloFabri What the user is trying to do (give coins) could be bad but it is still legal by apple. The only thing that isn't legal is to ask the user to rate the app with 5 stars. But on the other hand he can make him choose the stars and only if he choose 5 stars ask him to really rate or things like that same as what big companies do. In any case the developer cannot know how much stars the user gave so he would have to guess, also he should take into account that a lot of users would take the opportunity to rate the app with 1 star. – Idan Mar 10 '14 at 19:52
6

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).

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Idan
  • 9,880
  • 10
  • 47
  • 76
0

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.

Kevin
  • 3,111
  • 1
  • 19
  • 26
  • I'm also getting an error when testing on device (testing with iBook app id). Is it at least possible to know if the user did rate the app or just canceled? – Rodrigo Ruiz Mar 06 '14 at 03:53
0

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.

Preson
  • 244
  • 2
  • 8
  • This error in particular is on the simulator, but I'm also getting a similar error in the decide (with different code numbers). – Rodrigo Ruiz Mar 06 '14 at 03:47
  • https://developer.apple.com/library/prerelease/ios/releasenotes/DeveloperTools/RN-Xcode/index.html has **StoreKit (In-App purchases) will not work in the Simulator. 13962338** mentioned. Maybe this still exists! – Preson Mar 06 '14 at 04:46
0

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.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • Maybe I wasn't too clear, I edited the question with an image of what I want to do in my own app. – Rodrigo Ruiz Mar 06 '14 at 03:45
  • 1
    Although that image shows "5 stars", there is literally **NO WAY** to force a user to choose 5 stars, nor is there a way to detect if the user has given any stars / or even rated. So I think your best option would be to do a server-based rating system which will be totally and completely separate from the App Store rating system. – WrightsCS Mar 06 '14 at 04:26
0

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)

Aaron Butacov
  • 32,415
  • 8
  • 47
  • 61
Gianni
  • 1