Skip to main content
Solved

purchaserInfo when no connectivity


Forum|alt.badge.img+5

How does the SDK work when there is no cell or wifi?  Which methods will work on device-only, and which ones need connectivity to complete?  Will there be a noticeable delay to the call?   (Is there a doc describing this?)

The case is where you want to test for a valid iOS subscription/entitlement, but there is no network available.  Does it work?

 

Best answer by jazmine

Hey @TBZ :wave: ,

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

 

For example, if app is installed, but not launched right away, what would it look like if the app is later launched after leaving wifi zone?  

When launching an app that has been installed , but never connected to wifi ,we wouldn’t be able to display your products because we fetch the information from Google/Apple. Additionally making any purchases requires a wifi connection.  

 

Second example…  Once the purchase info appears on the device once, will it be accessible later without network?

Yes once the purchaserInfo appears on the device it will be accessible without network. It won’t be able to be updated until the user  is connected back to wifi. This means if someone already has a subscription the purchaserInfo will reflect this and even after they leave the wifi the SDK will check whatever the last purchaserInfo is cached on the device. 

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

4 replies

jazmine
Forum|alt.badge.img+7
  • Dedicated Contributor
  • 122 replies
  • August 6, 2021

Hey @TBZ :wave: ,

The SDK caches the user's subscription information to reduce your app's reliance on the network. Users who unlock entitlements will be able to access them even without an internet connection.


Forum|alt.badge.img+5
  • Author
  • 5 replies
  • August 7, 2021

Are there details available on that reliance?  (so we can plan how to deal with ‘no network’ when it is actually needed?)  I’m trying to understand the sequence of events.

For example, if app is installed, but not launched right away, what would it look like if the app is later launched after leaving wifi zone?  

Thanks.  


Forum|alt.badge.img+5
  • Author
  • 5 replies
  • August 7, 2021

Second example…  Once the purchase info appears on the device once, will it be accessible later without network?

 

thank you


jazmine
Forum|alt.badge.img+7
  • Dedicated Contributor
  • 122 replies
  • Answer
  • August 10, 2021

Hey @TBZ :wave: ,

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

 

For example, if app is installed, but not launched right away, what would it look like if the app is later launched after leaving wifi zone?  

When launching an app that has been installed , but never connected to wifi ,we wouldn’t be able to display your products because we fetch the information from Google/Apple. Additionally making any purchases requires a wifi connection.  

 

Second example…  Once the purchase info appears on the device once, will it be accessible later without network?

Yes once the purchaserInfo appears on the device it will be accessible without network. It won’t be able to be updated until the user  is connected back to wifi. This means if someone already has a subscription the purchaserInfo will reflect this and even after they leave the wifi the SDK will check whatever the last purchaserInfo is cached on the device. 


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