Hi there,
currently i am trying to implemented revenuecat to my flutter app. it was awesome and going so well. I am using custom app id and get the id from google sign in. To avoid creating anonymous id i implemented :
await Purchases.configure(
PurchasesConfiguration(withAPIKey: <my_api_key>)
..appUserID = "my_app_user_id");
Then User will login with google sign in and i implemented this :
LogInResult result = await Purchases.logIn(<id taken from google sign in>);
and it all going well and behave how it supposed to be. The problem comes when the the app restart and i need to know the user subscription status programatically when the app started, the code is:
await Purchases.logIn(<id taken from google sign in>);
if (customerInfo.entitlements.all["Premium Monthly"]!.isActive ==
true) {//grant premium feature}
and it turns null as the subscription checking is not active. but when i leave the login code behind like this :
if (customerInfo.entitlements.alll"Premium Monthly"]!.isActive ==
true) {//grant premium feature}
it works perfectly, but the app id will be as default as "my_app_user_id" not <id taken from google sign in>
the question is does the login code (await Purchases.logIn(<id taken from google sign in>);)only used when user trying to purchase the products only and not called programmatically at the start of the app?
it brings confusion when the app id is default but the subscription is active, and when app id is logged in as <id taken from google sign in>, subscription will be null.
Thank You