Skip to main content

Flutter: When I used  the sdk RevenueCat version 6.23.0 it worked perfectly, I have updated to the latest 8.1.0 and it does not show me the paywall, it shows me error 23, maybe the methods are different, I share how I call it.

in the main.dart I initialize it and check if it is a subscriber.

Future<void> initRevenueCat(BuildContext context) async {
await Purchases.setDebugLogsEnabled(true);
PurchasesConfiguration configuration;
if (Platform.isAndroid) {
configuration = PurchasesConfiguration('goog_xxxxxxxx');
await Purchases.configure(configuration);
}
else if (Platform.isIOS) {
configuration = PurchasesConfiguration('appl_xxxxxxxx);
await Purchases.configure(configuration);
}
bool esPro = false;
try { CustomerInfo customerInfo = await Purchases.getCustomerInfo();
 List<String> entitlementIdentifiers = ="Monthly", "Annual", "Six Months"];
 for (String id in entitlementIdentifiers) { if (customerInfo.entitlements.allaid]?.isActive == true) { esPro = true;
 break;
 } else { esPro = false;
 } } final prefs = await SharedPreferences.getInstance();
 await prefs.setBool('isSubscribed', esPro);
 } on PlatformException catch (e) { String? errmsg = e.message;
 }
}

And to call the paywall I have always used this

 

Future<void> showPayWall(BuildContext context) async {
PaywallResult result = await RevenueCatUI.presentPaywall(displayCloseButton: true);
if (result.name == 'purchased') {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool('isSubscribed', true);
Navigator.pushNamedAndRemoveUntil(context, 'home', (Route<dynamic> route) => false);
}
}

but it returns error23, with the RevenueCat sdk version 6.23 it didn't give me an error.

 

Can you help me?

Thanks.

Hi, could you please run debug logs so we can see the underlying error here and can you create a support ticket here and send them there?