You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our application replies on Adapty purchaser info by using AdaptyDelegate.didReceiveUpdatedPurchaserInfo. Adapty requests PurchaserInfo from backed in Adapty.activate method. But didReceiveUpdatedPurchaserInfo not reported when internet connection is not available.
There's an option to get PurchaserInfo, i.e. Adapty.getPurchaserInfo(forceUpdate:). So the there's a flow:
call Adapty.activate
call Adapty.getPurchaserInfo(forceUpdate: false)
this entails possible two requests to simultaneous requests to backed when internet is available. What is not optimal.
The delegate function didReceiveUpdatedPurchaserInfo, as its name and documentation suggest, should only tell the user about the updated state of PurchaserInfoModel, so I'm not sure if the behaviour you describe is a bug.
You can indeed get PurchaserInfoModel from the cache (if it is already there), by calling Adapty.getPurchaserInfo(forceUpdate: false).
I understand your concern about duplicate queries, and it probably makes sense to add some explicit way to get user information from the cache. In version 2.0 (coming very soon) and beyond, we'll think about how to do this properly.
I will leave this issue open as a reminder to us, but I will close your PR. As soon as something changes in this issue, I'll let you know!
Our application replies on Adapty purchaser info by using
AdaptyDelegate.didReceiveUpdatedPurchaserInfo
. Adapty requests PurchaserInfo from backed inAdapty.activate
method. ButdidReceiveUpdatedPurchaserInfo
not reported when internet connection is not available.There's an option to get PurchaserInfo, i.e.
Adapty.getPurchaserInfo(forceUpdate:)
. So the there's a flow:Adapty.activate
Adapty.getPurchaserInfo(forceUpdate: false)
this entails possible two requests to simultaneous requests to backed when internet is available. What is not optimal.
So I propose two options.
AdaptyDelegate.didReceiveUpdatedPurchaserInfo
inprivate func configure(_ completion: ErrorCompletion? = nil)
when purchaserInfo is not empty, before identify or getPurchaserInfo calls. Fix didReceiveUpdatedPurchaserInfo when internet is not available #54Adapty.getPurchaserInfo(forceUpdate:)
option to skip network request.Thanks!
The text was updated successfully, but these errors were encountered: