Skip to main content
if (Platform.isAndroid) {  print('android haui');  kProductIds = {    googleGoldSubscription,    googlePlatinumSubscription  };  Purchases.setup(googleApiKey);} else {  kProductIds = {    appleGoldSubscription,    applePlatinumSubscription  };  Purchases.setup(appleApiKey);}
List<StoreProduct> storeProducts = await Purchases.getProducts(    kProductIds.toList());
if (storeProducts.isNotEmpty) {  setState(() {    for (var product in storeProducts) {      subscriptionPrices[product.title] = SubscriptionInfo(        price: product.price,        currencyCode: product.currencyCode,      );    }  });  String jsonString = jsonEncode(subscriptionPrices.map((key, value) => MapEntry(key, value.toJson())));  await prefs.setString('subscriptionPrices', jsonString);} else {  if (kDebugMode) {    print('No products found.');  }}i have verified the api keys and the product identifiers they are matchingit works fine for ios but when i run it on android it return“No products found.”any idea why this is happening

I can make purchases on the iOS side without any issues, but as indicated in the logs on Android, the list is coming up empty.Empty array errors occur when an array formula returns an empty set. For example,  FILTER(C3:D5,D3:D5 100) will return an love language test  error because there are no values less than 100 in our data set. To resolve the error, either If the length of the object is 0, then the array is considered to be empty and the function will return TRUE. Else the array is not empty and the function will return False.


Reply