Search code examples
swiftin-app-purchaserevenuecat

How to Authenticate Auto Renewable Subscription without Internet Connection using RevenueCat


I know it is recommended to use the Purchases.shared.purchaserInfo method to authenticate subscriptions throughout your app but how about when the user is not connected to the internet.

What would be the recommended way to validate a user who is not connected to the internet when using RevenueCat?

Thanks


Solution

  • The purchaserInfoWithCompletionBlock method will read from a cache first so is safe to call even without an internet connection.

    Source: https://github.com/RevenueCat/purchases-ios/blob/d8282e7c5db2f9b84ca432c1f3d09c28457f00bd/Purchases/Public/RCPurchases.m#L381