Skip to main content
Answer

Does RevenueCat on iOS cache between app starts?

  • March 21, 2023
  • 5 replies
  • 225 views

Thomas Walther
Forum|alt.badge.img+6

Does the RevenueCat SDK cache products between app starts? I can’t find anything in the documentation about this.

 

Use case: user opens app while device is offline and hits a paywall. While they won’t be able to proceed with the purchase, it would still be great to display prices.

Best answer by Miguel Carranza

Hi Thomas,

 

Unfortunately, this will not work if the device is offline. The product configuration comes from RevenueCat (which could be cached, even though we are currently not leveraging it), but the actual price and product information comes directly from the stores. Unless you hardcoded prices in your paywall (which is disallowed by the stores, given that prices and currencies change), there is no real way to accomplish that.

This post has been closed for comments

5 replies

Miguel Carranza
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Answer
  • March 21, 2023

Hi Thomas,

 

Unfortunately, this will not work if the device is offline. The product configuration comes from RevenueCat (which could be cached, even though we are currently not leveraging it), but the actual price and product information comes directly from the stores. Unless you hardcoded prices in your paywall (which is disallowed by the stores, given that prices and currencies change), there is no real way to accomplish that.


Thomas Walther
Forum|alt.badge.img+6

Thanks for the answer. In that case we keep our current caching mechanism. We currently store the formatted prices in our own cache, so that we can always display a price.

 

For us, that’s really important. We have a lock screen widget which is a paid feature, so when a user on the free plan opens the app via the lock screen widget, we need to display the paywall right away. If the app wasn’t already running in the background, this can mean several seconds waiting time just to display the paywall.


Thomas Walther
Forum|alt.badge.img+6

@Miguel Carranza - now that the SDK has support for offline entitlements, does that also mean it caches offerings?


Miguel Carranza
RevenueCat Staff
Forum|alt.badge.img+6

Hi Thomas,

 

It catches the offerings from RevenueCat (configuration) but not the product information (such as localized prices) coming from the stores


Thomas Walther
Forum|alt.badge.img+6

Ah ok. That would still be awesome to have going forward. We currently have to cache that manually in our app for all the cases where a paywall appears directly on launch.