Skip to main content
Solved

How to get the current subscription status immediately

  • October 10, 2022
  • 1 reply
  • 342 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.

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

1 reply

Miguel Carranza
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 84 replies
  • 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.


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