I'm experiencing some delay on the PurchaserInfo data right after login.
I'm using the Transfer Purchase behavior from https://docs.revenuecat.com/docs/restoring-purchases.
Problem: PurchaserInfo returns without active entitlements right after
Steps to reproduce:
1.With a anonymous user, buy a subscription
2. Now the anonymous user has an active entitlement on PurchaserInfo
3. Log in (
Purchases.login()) on a account with no active entitlements
Purchases.getPurchaserInfo() to check if user has active entitlements
Result: The recently logged in user has no active entitlements, even though they should (because of the Transfer Purchase behavior). However, if I call
Purchases.getPurchaserInfo() again after 2-5 seconds, then the PurchaserInfo returns correctly, with the user having the active entitlement.
To fix this I'm using
addPurchaserInfoUpdateListener, so I can observe better the PurchaserInfo changes. But is this delay after transferring a purchase normal?
Best answer by jazmine
You have the right idea using
addPurchaserInfoUpdateListener we recommend setting up this listener to observe any PurchaserInfo changes. Overall I think you are running into a combination of a slow network and waiting for PurchaserInfo to update. When using the
Purchases.login() this will update the cache, but login waits for a callback to do this.