Skip to main content
Solved

getOfferings always async return?


Forum|alt.badge.img+2

Just trying to understand how this is supposed to work.  No matter how many times I may call getOfferings it returns asynchronously.  Even if the debug messages say that it is vending from the cache, return is async.  The doc says the following with regard to the completion block: “Called immediately if offerings are cached.”  Is this just wrong or is the behavior I am seeing unexpected?

Best answer by cody

Hey @Guy Umbright!

The getOfferings method will always be asynchronous, even if there is a value cached - the inline comment is referencing that the method won’t make a network request (but not necessarily that it will return synchronously).

Sorry for the confusion here!

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

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 487 replies
  • Answer
  • January 26, 2023

Hey @Guy Umbright!

The getOfferings method will always be asynchronous, even if there is a value cached - the inline comment is referencing that the method won’t make a network request (but not necessarily that it will return synchronously).

Sorry for the confusion here!


Forum|alt.badge.img+2
  • Author
  • New Member
  • 1 reply
  • January 27, 2023

Thanks for the clarification.  


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