How to add "Rate 5 stars to get coins/reward"? - ios

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:

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.

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

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)

Related

GKLocalPlayer localPlayer cannot authenticate: "this application is not recognised by Game Center" error GKServerStatusCode 5019

When authenticating the GKLocalPlayer.localPlayer with Game Center the console logs a message:
_authenticateUsingAlert:Failed to authenticate player with existing credentials.Error: Error Domain=GKErrorDomain Code=15 "The requested operation could not be completed because this application is not recognised by Game Center." UserInfo={GKServerStatusCode=5019, NSLocalizedDescription=The requested operation could not be completed because this application is not recognised by Game Center., NSUnderlyingError=0x600001fc57a0 {Error Domain=GKServerErrorDomain Code=5019 "status = 5019, no game matching descriptor: ios:***.***.***:1.4:4+-1" UserInfo={GKServerStatusCode=5019, NSLocalizedFailureReason=status = 5019, no game matching descriptor: ios:***.***.***:1.4:4+-1}}}
After this, I CAN access the player properties such as avatar and name, but Game Center will not show any leaderboards or achievements, nor can scores be submitted.
iOS 15.2, on any device or Simulator the same happens.
I have tried EVERYTHING I could find on the web:
check correct bundle ID
create a leaderboard in App Store Connect
create an achievement in App Store Connect
create a whole new app in App Store Connect
create a whole new project in Xcode
delete and re-add Game Center capability
use a different Apple ID to sign in to Game Center
use a different Apple Developer Account and do the above again
I do have two other games in which everything works fine. In many old posts about this, no one ever got any answer or solution, so I am thinking Apple's backend system is buggy.
If anyone has ANY information on how to solve, please help.
After contacting Apple Developer Support, the issue was escalated to Apples engineering team.
Meanwhile I found several other cases on the internet, all of which were "resolved" by waiting 5-7 days, then deleting or adding a Game Center Achievement or Leaderboard, and then suddenly, magically things worked.
So I tried it one more time and now it works.

Can I get a response back when a user rates my app or taps "not now" for app store review request poppups?

I've added an app review request poppup in a few places around my app via this method: SKStoreReviewController.requestReview(). I want to ensure that they are placed in effective spots so users feel inclined to give my app a review rather than skipping the request poppup and tapping "Not Now". I was wondering if it is possible to get a callback or a response back once the user has selected one of the two options: "☆☆☆☆☆" (some rating) OR "Not Now".. Would it be possible to create an extension for the SKStoreReviewController that sends back a response from these buttons?
My consensus is that this is not possible in a straightforward way as Apple wants to keep it proprietary so developers don't penalize users for not rating apps when given a prompt. The code for the SKStoreReviewController (for the actual buttons "Not Now" and giving the star rating) is proprietary.

My Own Impressions on AdMob?

I successfully made an app and its waiting for review right now. But meanwhile i've been playing the game on my mom's phone because, one, i dont have an iphone and its for iphone, and two, I actually like playing it. But I looked at my admob because i wanted to make sure i wasnt messing with it by playing my own app but it turns out i have 100 impressions! D: No clicks though, and i know im not supposed to click on my own ads. What do the impressions do? what are they? Am I going to get in trouble? I stopped playing the game now.
btw my moms iphone no longer has my developer Apple ID signed in on it, but it can still play the app and the UDID is still registered with the developer account if that matters.
Nothing to worry about.
Impressions are when an ad is displayed.
Requests are when an ad is requested.
Clicks is when you clicked on an ad (you haven't done that so nothing to worry about).
It's probably a good idea to add some quick code that differentiates between you and every other user. "If username == 'MobileGamer', don't display ads", or something similar. Just to be safe.
For example, I have several websites where both the ads and the stats-tracking code is omitted if I'm the logged-in user. That way, Google can't claim that I'm trying to steal money from them when I'm using my own website (they've tried before), and my user stats aren't skewed by huge activity spikes whenever I'm adding features or testing.
I haven't used AdMob specifically, but ad companies are famously strict with this sort of thing. I was once kicked from an advertising plan simply because my roommate, who was on the same network as me, clicked on an ad no my website once.
Better not to risk it. Just don't show the ads at all, for you or your testers.

Is there an iOS API that can identify which of your contacts are likely other iOS users?

... for example, by finding your contacts that have iTunes logins.
Why? We're launching an app on iOS. We'd like a feature to allow users to connect with their friends who can download and install the app.
No. The closest you might get (from the top of my head) is Game Center. All your friends on there are guaranteed to have an iOS device. Of course, not all iPhone owners use Game Center.
It is possible because Apple uses it in their own apps:
Messages - when typing in an email. The text will appear red if the email you want to iMessage is not setup with iMessage
Find My Friends - same kind of thing
However it's probably a closed API that they're using. It's possible that they use the now deprecated udid retrieval method.
You could try to query an Apple Server for the Apple ID and see what kind of response you get (just a shot in the dark there). Or you could search through GameCenter for a list of friends. Facebook might have some information on which users are iOS users too, take a look at their API and some Facebook profiles to see if theres anything you could check there.

How to track User Conversion Rate by iTunes Affiliate Link within an iOS App

Given the following scenario:
An affiliate link is clicked to route the user to the iTunes App Store
Shouldn't matter if the link is clicked on the device itself or on a Mac/PC.
(Whereas the links are those links from LinkShare for instance)
The app is then being installed on an iOS device.
As soon as the user starts a certain action (for example buying in-app-purchases), this action will be logged together with the original Id of the affiliate ID, which made the user install the app.
The goal is to be able to track "converting users" (aka conversion rates) in dependance of the affiliate. Example: "60% of the users brought by Affiliate XY converted from non-paying to paying users".
What would be the best practice to achieve the above?
Pretty much every campaign analytic service should allow you to set this up just fine. One I know for sure does as I set it up last week for a project is
AppsFlyer: Mobile Apps Installation & Conversion Tracking
In issue 101 of iosdevweekly there was a Tapstream promotion so I took a look at that and they look like they'd do the job fine as well:
Tapstream: App Marketing, Unified.
If neither of those look perfect, here's a bunch of other competitors you can check out too.

Resources