Hello,
I’m setting up a subscription with 7 days free trial & 1 year period on Android & iOS, using Flutter SDK. I want to show on the UI wether the subscription is:
- not subscribed
- in trial (& active)
- active
- cancelled (& active)
- expired
All states work except cancelled (when the subscription is still active but won’t renew). Upon my app startup, I call this code:
Purchases.invalidateCustomerInfoCache();
_customerInfo = await Purchases.getCustomerInfo();
Even though RC’s debug logs print “😻 CustomerInfo updated from network.”, I still get cached entitlements whose “willRenew” field is always true.
I added an overflow menu action to execute this code whenever I want to see if calling it multiple times works (as I read here & there on the forum), it doesn’t.
The only way to get an up to date information is to call Purchases.restorePurchases(), but this shall only be called upon user request.
Is there a way to get up to date CustomerInfo upon app startup?