I'm testing the login/logout system of the RevenueCat SDK on Flutter.
I'm using the Transfer Purchase behavior from https://docs.revenuecat.com/docs/restoring-purchases.
Problem: PurchaserInfo entitlements returns empty after
Purchases.getPurchaserInfo() only returns correct after I refresh the app and call
Steps to reproduce:
1. Enter app, call
Purchases.setup() (without appUserId).
2. Do a subscription purchase
3. Now with the user with subscription, call
Purchases.login(). The user now has a provided app id and has the subscription entitlement.
Purchases.logOut(). Now the user has an anonymous id.
Purchases.getPurchaserInfo() to retrieve the user's entitlements and check if the user has subscription.
Result: the user has no entitlements, even tho the user bought the subscription on that same device.
6. Refresh the app and call
Purchases.setup(). Now when
Purchases.getPurchaserInfo() is called, it returns the subscription bought by the user.
Am I doing something wrong? should I call
Purchases.logOut()? Also, I'm calling setup every time the app opens up, is this correct?
Best answer by ryanView original