Skip to main content
Solved

Offline Entitlement


Forum|alt.badge.img+5

What are the best practices to implement offline use-case?

One of the main features of our subscription is to use our outdoor app with poor internet reception or no reception with maps and other information downloaded before. 

  • can we check the subscription status while the device is offline?
  • what happens when the reception is very bad but not offline, is it still good to call “Purchases.shared.purchaserInfo” or will it make the UI feel non-responsive?

Best answer by ryan

Yes, you can call the .getPurchaserInfo() method the same way you would as if the device is offline. 

The latest PurchaserInfo object is cached on the device, and will always be returned first, so your UI will remain responsive. The cache gets updated via the network in the background so it will not block your app.

What this means for your customers is that the subscription status will remain the same as what it was when the device went offline.

View original
Did this post help you find an answer to your question?

2 replies

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • August 10, 2021

Yes, you can call the .getPurchaserInfo() method the same way you would as if the device is offline. 

The latest PurchaserInfo object is cached on the device, and will always be returned first, so your UI will remain responsive. The cache gets updated via the network in the background so it will not block your app.

What this means for your customers is that the subscription status will remain the same as what it was when the device went offline.


Forum|alt.badge.img+6

Is the cache cleared once I close the app? Because when I close/open the app on iOS in offline mode, the entitlements are gone. 

It would be awesome if the entitlements are cached until the next refresh from RevenueCat server when being online again.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings