What happens in Offline in these cases?

  • 16 March 2024
  • 1 reply
  • 19 views

Badge

I uses RevenueCat Flutter SDK.

What happens in Offline in these cases below?
1. presentPaywallIfNeeded()
2. Purchase attempt.
3. If offline purchasing is possible, is CustomerInfo updated once the purchase (subscription) has been made but the user is still in Offline.

Extra question:
How to learn if there is any cached CustomerInfo data at all?


This post has been closed for comments

1 reply

Userlevel 4
Badge +6

Hey @artem-koniaev-1a6110 !

 

The app_user_id and CustomerInfo are cached when the user is offline. CustomerInfo will be returned while offline forever if the user never goes online, unless something happens that invalidates the cache. Currentlyofferings do not persist between app launches, so you will need to manually cache this data and display them yourself when the app is offline.

 

If you attempt to make a purchase while offline, you might get a OFFLINE_CONNECTION_ERROR in the error object from the purchase attempt.