Solved

How to get the current subscription status immediately

  • 10 October 2022
  • 1 reply
  • 185 views

Badge +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!😊

icon

Best answer by Miguel Carranza 13 October 2022, 00:06

View original

1 reply

Userlevel 2
Badge +6

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