Game Center achievement behavior for multiple account game - ios

Let's say that you develop an iOS game that allows the user to login and log out of different accounts using in-house account system. For example, you could login using Facebook, or email/password combination.
What is the best way for this game to handle Game Center achievements? How should situations with logging in and out handled?

Regardless of your in-house account management system, the associated user will need to login to Game Center. Unfortunately you cannot force a Game Center logout via iOS; this is something the user will need to do on their own.
As far as tracking achievements goes, let Game Center handle all of that. Your real challenge is going to be getting the user to explicitly launch the Game Center standalone application to sign-on & sign back in, either within the GC app or via your app's GC [login] presentation.
In order to ensure proper achievement progress is reported across users' accounts, the user logged into your app with their in-house account must also be logged in with their Game Center account. One way to at least ensure you don't cross the streams regarding achievement tracking & reporting is to have the user enter their Game Center display name while logging in via the in-house system.
Once past the in-house authentication, let Game Center player authentication take place, retrieve the local player's playerName and compare. If they match, flag this and track / report achievement progress normally.
If they don't match, it's up to you whether to prompt the user again for this information to check again. At the very least you should communicate to them that the in-house account does not match the Game Center account, and to move forward they will need to launch the Game Center app to logout & login. Otherwise, flag the mismatch, and use this logic to bypass achievement reporting (and potentially other GC functionality).
There's a post here with some more ideas.
Good luck!

Related

Stripe: how to omit 3D Secure?

We have created an iOS app for short rental owners with the objective of holding rental deposits on a credit card during a few days. The user can decide to capture the payment if there is something broken in the flat.
This app has been made with Stripe.
We encounter the following issue: when the user enters his client's credit card in the app for holding a deposit of about 300€ for exemple, Stripe doesn't accept to continue the operation without 3D Secure verification.
While in the same time, it works perfectly without 3D Secure when doing this operation on the Stripe Dashboard, with the same credit card, the same amount and the same location.
We would like to omit 3D secure in our iOS app, just like the Stripe Dashboard.
How is it possible ?
Thanks for your help
This is not recommended, you should build your integration to support 3D Secure authentication, even when placing a hold to capture later.

What is the difference between Game Center and Apple Sign-in?

Recently Apple released "Sign in with Apple" / Apple Sign-in. This will supported starting from firmware 13.
https://developer.apple.com/sign-in-with-apple/get-started/
As far as I remember, Apple also has "Game Center". The usage for this feature are includes saving game progress on cloud, Achievements, etc.
Android users might be familiar with Google Play Games. In Apple it was this "Game Center".
My question is, what is the difference between Apple Sign-in and Game Center? Is it only the firmware supported?
What is the difference between Game Center and Apple Sign-in?
Well, Game Center is for games. While Sign in with Apple is for your usual applications. You wouldn't take an effort to integrate Game Center in your Enterprise, Banking, Social Media Apps, would you?
Furthermore, Game Center is basically Apple's social gaming network. It uses a framework called Game Kit.
What does Game Kit do?
GameKit provides you with the ability to create apps that allow
players to interact with each other. Multiplayer apps allow your game
to create real-time network matches. Players can invite other players
to join their game. Most importantly, players can receive invitations
to join a match even when your game is not running. Your game is
running on each device and the instances of your game exchange match
and voice data with each other.
Lastly, Sign in with Apple is pretty much like your Sign in with Facebook or Google Sign in.
Sign in with Apple allows you to set up a user account in your system,
complete with name, verified email address, and unique stable
identifiers that allow the user to sign in to your app with their
Apple ID. It works on iOS, macOS, tvOS, and watchOS. You can also add
Sign in with Apple to your website or versions of your app running on
other platforms. Once a user sets up their account, they can sign in
anywhere you deploy your app.
docs:
Game Center: https://developer.apple.com/game-center/
Game Kit: https://developer.apple.com/documentation/gamekit/
Sign in with Apple: https://developer.apple.com/sign-in-with-apple/get-started/

Simple Login Form in cocos2d

It would be appropriate to include significant account-specific features from Amazon and not just an authentication method in order to be in compliance. You may also implement your own optional registration, iCloud or Game Center as another option.
Great Apple rejected my game 6 times due the above reason, first of all, they rejected my game because they said it need a user registration to save purchased data even if user changed the device and they can access all purchased things if he have a registered user id with the game, i done the user registration using amazon login sdk, and three other games approved with the amazon login, but this game rejecting showing the above reason., is there any sample login view form for cocos2d for user registration? i dont know how can we do a login with iCloud or game centre. all i want to do is a simple login form for cocos2d.IS there any samples out there how to make a login form using iCloud or game centre ,, i have some ,but they al are native iOS sample, cocos2d samples is not there.
hope anyone can help me to get rid of this situation.,

App rejection for User registration

I recently submitted a multiplayer trivia app to the app store. There are 2 versions of the app but they are essentially the same thing just for different trivia.
One app was accepted but the other rejected
Here is the rejected reason
17.2 Details
We noticed that your app requires users to register to access non account-based features. Apps cannot require user registration prior to allowing access to app content and features that are not associated specifically to the user.
My app has followed the process that is similar to other major apps like trivia crack and words with friends.
The user gets a screen to sign in with facebook or sign in with email. When they click on sign in with email it brings them to a screen where they enter their email. We then create an account for them in the app.
This is required so that we can keep track of the user in each of the games they are playing and who they are playing against we also keep stats for that user based on how many questions they get wrong and how many right, also how many wins. We are storing all of this on our webserver so that the user can also use his account on a different device so that they can play their games on their iphone, ipad, ipod and so on.
We ask for nothing other than email, and if we dont have them register then we cant maintain all this information for them, especially if moving from device to device. Again, this is how almost ALL other larger multiplayer apps in the store do it. I mimicked them exactly.
I dont get it. Plus, one reviewer accepted one of the apps and another rejected the other app.
Should I appeal?
Yes, you can appeal.
You can explain your position to reviewer, we had similar problem and after we've created appellation application was published.

how to synchronise "non-consumable purchase" with a "online multiplayer game server"

We are developing an online mobile multiplayer game for iOS platforms.
In our game, a player may purchase and activate the "PRO" mode to get some extra benefits.
So, we created a "non-consumable" type of in-app purchase. because, "PRO" mode is a kind of one time purchased, forever activated item. We will activate it and store the necessary data on the server, but we also need information about "who have just purchased this item form itunes game store".
My question is: how can we synchronise user's appleid and the server game account? appleid is a private variable which we can't get from SDK.
We also cannot use identifierForVendor, because someone can login and logout with different accounts on the same device.
Is there any solution is this situation? Or do you advice me to change this item as "consumable" type and handle all the works on the server side? ( I suppose this situation may also create some kind of trouble in the future )
EDIT: How can I detect that: someone delete the app, reinstall, log in to game server with different account and restore PRO mode for this account (he can easily do this probably lots of his friends who play the game) I wonder, how can I match appleuser <==> gameuser in this situation?
You can implement "restoreCompletedTransactions" method for your non-consumable items.
It's ready to use mechanic by Apple which allows user to restore purchases - you just provide a button and implementation.
Also check: https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf
I found the solution
It is explained under the Server Product Model section.
There is an extra receipt validation process between the game server and itunes server. I get the transection receipt data with mobile app, send it to the game server, and then game server check this receipt if it is valid or not.
https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StoreKitGuide/APIOverview/OverviewoftheStoreKitAPI.html#//apple_ref/doc/uid/TP40008267-CH100-SW11

Resources