0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Rephisto
  • 89
  • 1
  • 7

2 Answers2

0

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

Grzegorz Krukowski
  • 18,081
  • 5
  • 50
  • 71
  • 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** ? – Rephisto Oct 07 '13 at 10:03
0

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

Rephisto
  • 89
  • 1
  • 7