While testing my subscriptions on IOS with a sandbox account i found a strange behaviour of getCustomerInfo(), needing to call it twice in order to get the correct data.
The way i’ve set my app is to call getCustomerInfo on appLaunch and on appResume, to check for updates. The scenario is the following:
I purchase a subscription and get back info that the entitlement is active and my expirationDate is 5min from now (because of the sandbox account). Then i minimize the app and wait 6 mins, after which i can see the sub renewal transaction appearing in rc dashboard and in the customer details screen. I open the app, which triggers getCustomerInfo, but it’s returning the same data i got from when i first purchased the sub. Then when i minimize the app and open it again, triggering getCustomerInfo for the 2nd time, it return the correct updated data with the new expirationDate.
Is this the expected behaviour? Is this because of Sandbox? Or am i doing something wrong?
P.S. it’s a flutter app, if it makes any difference.