Solved

Share subscription between multiple devices with the same Apple ID


Badge

Hi,

I’m using revenue cat in a flutter app to manage subscriptions. Users are not logged in, I’m only using anonymous App User IDs. It works like a charm.

However, a user has subscribed on his ipad and cannot use the entitlement on his iphone. He has an error when he tries to subscribe to the same entitlement.

If I add the restore purchases method, will that solve this issue ?

Or do I need to log in users ?

Thank you for your help

icon

Best answer by Miguel Carranza 24 June 2022, 18:37

View original

7 replies

Badge +1

It’s actually an App Store requirement that you have a Restore Purchases button, so obviously App Review missed it. So yes, add a Restore button to your app.

Userlevel 1
Badge +3

A restore button is not strictly required, what Apple requires is a restore mechanism: 

 

Any credits or in-game currencies purchased via in-app purchase may not expire, and you should make sure you have a restore mechanism for any restorable in-app purchases.

 

Therefore, if your app has its own account system, you don’t need a restore button (even though it is recommended for user experience). If you are only using anonymous accounts, then you need to have it.

Badge

Thank you

I confirm that the restoring purchases method works with anonymous accounts on 2 ios devices which are sharing the same ios account. I hope it is clear.

Thank you

I confirm that the restoring purchases method works with anonymous accounts on 2 ios devices which are sharing the same ios account. I hope it is clear.

Hey Paul, so how did you solve this? In my app I’ve implemented the restore purchases button which calls the following function:

    public func restorePurchases() {
var activated = 0
Purchases.shared.restorePurchases { (customerInfo, error) in
if let entitlements = customerInfo?.entitlements.all {
activated = self.processCustomerInfo(entitlements: entitlements)

if (entitlements.isEmpty) {
self.showingRestoreFailedAlert.toggle()
}
}

// user has something activated - show thank you dialog
if (activated > 0) {
self.showingRestoredAlert.toggle()

// there was some error - show nothing to restore dialog
} else if let error = error {
print(error.localizedDescription)
self.showingRestoreFailedAlert.toggle()

// user has no active subscripions - show nothing to restore dialog
} else if (activated == 0) {
self.showingRestoreFailedAlert.toggle()
}
}
}

Yet users are complaining on the same issue - bought my app from iPhone and are unable to restore purchases on iPad using the same account. All of my users are anonymous, I don’t have any kind of account management in my app. If they try to tap on a button that should initiate the purchase, it doesn’t seem to do anything either. I’m using the RevenueCat (4.3.0) library via Pods and on sandbox I never had this issue. 

 

Thanks.

Also worth noting I wasn’t able to reproduce this behavior with my own devices, but they might be tainted with all the testing I’ve done in the past...

Badge

Hi,

I can't guarantee that your code is correct as I’m using flutter.

However have you defined your restore behavior as transfer purchases ?

Hi Paul, thanks for getting back to me. I have set “transfer purchases” yes. Also this behaviour is not consistent among users. Most of them can restore purchases just fine. I’ve only migrated to RevenueCat last month, so I thought maybe I’m missing something in configuration.

Reply