Restore in-app purchases when same native (Apple/Google) account on device but different app accounts

前端 未结 2 522
醉话见心
醉话见心 2021-01-16 18:20

You have a mobile app (Android/iOS) that requires the user to sign-in. The mobile app offers in-app purchases. A user makes an in-app purchase while * signed in as X on the

相关标签:
2条回答
  • 2021-01-16 18:48

    From reading through the docs relating to in app purchases on iOS the purchase is always tied to the device account, or Apple ID in the case of iOS.

    Restoring purchases prompts for the user’s App Store credentials

    Source

    That's just the way it is and we have to work with it.

    One possible solution would be to mark users of your app who have bought an in app purchase as "members" or "subscribers" in your own back end.

    I am simply assuming that you have your own back end because as far as I know you need to have one to verify the in app purchase, and you also mentioned logins.

    Then when a user goes to reinstall the app after they have deleted it, they then sign into the app, your app checks with the back end to see if the current user is the one who purchased the in app purchase, if they are, then restore the purchase, if not then don't. Then going forward you just show and hide the paid content based on whether or not the signed in user is the one who made the purchase,

    0 讨论(0)
  • 2021-01-16 18:52

    If you have your own account based system, you aren't required to restore purchases from the device receipt if they can be restored by logging in to their (your) account. Apple vaguely mentions this in their docs as do service providers.

    From Apple (their example is iOS/macOS but might as well be iOS/Android):

    You could let users who have a subscription in an iOS app access the content from a macOS app (or vice versa), but implementing that functionality is your responsibility. You would need a system to identify users and keep track of the content they are subscribed to, similar to what you would implement for an app that uses non-renewable subscriptions.

    From RevenueCat:

    Using an externally managed App User ID also provides a mechanism by which to restore purchases in a few scenarios:

    ...

    1. When the user logs in on multiple devices - you can honor a subscription that was purchased on one device across any other platform.

    You'll notice large, cross-platform, subscription apps like Netflix don't have a restore purchases button anywhere. As you've pointed out, restoring purchases could allow a single purchase receipt to be shared across multiple users that log-in on the same device.

    Disclaimer: I work at RevenueCat

    0 讨论(0)
提交回复
热议问题