Oysio
Oysio

Reputation: 3318

Offering auto-renew subscriptions to multiple apps

As is confirmed by Apple here it should be possible to add the same auto-renew iap to multiple apps. I have an iPhone and an iPad app in which I want to offer one auto-renew iap, which when purchased once will unlock both apps. To handle the subscription across both apps, I've setup a server where the auto-renew receipt is uploaded to once it's been purchased by the user. Each time a user opens one of these apps, a connection is made to the server to check if there is an active subscription, if there is one the app is unlocked, if not the 'buy a subscription' screen should pop up.

Now the question I am facing is how do I identify each user on the server when he checks for an active subscription ? How do I know when a user has bought a subscription before in on of the other apps ?

Upvotes: 1

Views: 857

Answers (1)

appsrgrrrreat
appsrgrrrreat

Reputation: 11

I have an iPhone and an iPad app in which I want to offer one auto-renew iap, which when purchased once will unlock both apps

I assume the iPhone and iPad app is not an universal app. Meaning, they do not share the same bundle ID. If it is an universal app, the receipt containing renewable subscriptions will be delivered as part of the App Store download.

how do I identify each user on the server

Since you don't want to bother the user with signing up for yet another account, you can persist the most recent active subscription date in iCloud. NSUbiquitousKeyValueStore is perfect for this. From a quick network inspection, this is how Ulysses seems to be handling universal subscriptions (they seem to be using a combination of iCloud KVS and CloudKit to determine if a user has already purchased a subscription on their Mac or iOS app). However, it now becomes an issue of whether your users have iCloud accounts.

Upvotes: 1

Related Questions