Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Renewable In-App Purchases in an app that supports multiple user accounts on one device

Background

My iOS app supports multiple user accounts, but the user can only be logged into one account at a time. The app also offers a subscription service ("credits" in the form of a renewable In-App Purchase).

I'm having trouble keeping the in-app subscriptions separated to the specific user account that bought them. If a user buys credits on Account One and then signs out, and another user signs into Account Two (on the same device), the SKPaymentQueue still proceeds with the renewal process for the purchases from Account One (and, consequently, triggers the logic that unlocks those credits).

Question

What is the correct method of handling renewable in-app purchases for an app that supports multiple accounts? Is there any way to keep purchases from "overflowing" into other accounts on the same device? What else should be kept in mind?

like image 658
lobianco Avatar asked Oct 18 '12 21:10

lobianco


People also ask

Can in-app purchases be shared?

No. This is due to restrictions put in place by Google – core apps can be shared but in-app purchases cannot. For more information on Family Library and its features, please visit the link below.

Can you share in-app purchases iOS?

You can share content that you purchase from Apple including music, movies, tv shows, apps, and books. You can also share your Apple subscriptions including Apple One.

Which framework is needed to support in-app purchases on iOS?

In-App Purchase allows you to embed a store inside your app using the Store Kit framework. The framework connects to the AppStore on your app's behalf to securely process payments from users, prompting them to authorize payment.


1 Answers

I'm pretty sure what you're trying to do isn't possible. In-app purchases are tied to the Apple ID that purchased them. That means that if the user is logged into an Apple ID that has purchased the subscription, you are always going to be told it is available. A single user can't purchase the same subscription multiple times. The only way would be to force an Apple ID change when they change users in your app, which I'm almost certain you can't do.

like image 95
hukir Avatar answered Nov 15 '22 00:11

hukir