Auto-renewal subscription (Multiples User - Same device)

I have a doubt with Auto-renewal subscription (In-App purchase). I need to keep the subscription on my server (with it’s own account management, login/registration), because the user can move to another device (or platform).

Suppose the following scenario: “User A” subscribe to the app (with it’s Apple Id), I know that a receipt document is created on the device (that contains all the purchases by this user ~ AppleId), then the SKPaymentQueue will dispatch a transaction to the delegate, and from my side need to communicate the receipt (base64) to server and after received response finish the transaction. Now, let’s suppose that “User B” use my app in the same device (and he is not subscribed ~ according to my server):

  1. Can I still show the options to subscribe? (I mean, although he is using the same Apple ID that user A).
  2. If the purchase is created in the same receipt, how can I differentiate between user A and B?
  3. Same as before, when the server-to-server (AppStore - My Server) notification is send with an update to a subscription, how can I differentiate between user A and B?
  4. If the user B go to settings (In App-Purchase) will show that have a subscription (but in reality for user A)?

Replies

When user B uses the device there is nothing telling your app that it is not user A.


Your app could require that the user (A or B) refresh the receipt. Depending on how long ago the last user interacted with the app store, that MIGHT require that the current user log into their account on the app store. That WILL require a log in if the last user logged out of the app store before handing the device to the other user.


Your app could require that the user log into your server each time they want to use the app.


Or you could forget about it.


@Roberto258,


This was a long ago, still I am curipus if you found any solution to this problem. Please share your thought on this.