Skip to main content
Answer

How to get the current subscription status immediately

  • October 10, 2022
  • 1 reply
  • 411 views

Forum|alt.badge.img+3

I am developing an iOS app and I am using .getCustomerInfo() to retrieve the current subscription state as suggested in the Documentation.

The SDK will update the cache if it's older than 5 minutes, but only if you call getCustomerInfo(), make a purchase, or restore purchases, so it's a good idea to call getCustomerInfo() any time a user accesses premium content.

 

However, the 5 minutes “delay” causes sometimes dubious experiences.
If, for example, a user has just purchased something, it is possible that he will not be able to access the content he has just purchased for a while because he is still stored in the cache as a non-purchaser.

Is there a way to force a network request and bypass the cache?
I would only want to do this directly after a purchase, so that the data is up to date again.

Probably there is a very simple way and I'm just on the fence?😅

Thanks in advance!😊

Best answer by Miguel Carranza

Hi wildcard, 

 

No need to force anything, the SDK will automatically get the latest purchaser information after a purchase, so that case should be perfectly covered.

This post has been closed for comments

1 reply

Miguel Carranza
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Answer
  • October 12, 2022

Hi wildcard, 

 

No need to force anything, the SDK will automatically get the latest purchaser information after a purchase, so that case should be perfectly covered.