I’m trying to follow the docs for the capacitor purchases plugin. I’m migrating my codebase from the awesome-cordova-plugins approach I used with capacitor 2. Incidentally, docs are not entirely clear as sometimes there’s no capacitor example (only cordova). Anyway, my issue is
If I use one of these ...
const customerInfo = await Purchases.getCustomerInfo();
Purchases.getCustomerInfo().then((customerInfo) => {
Then use this ... it tells me there’s no entitlements property …
customerInfo.entitlements.active
But if I double up the ‘customerInfo’ then it doesn’t complain …
customerInfo.customerInfo.entitlements.active
Note that these issues are showing up in VSCode editor … I haven’t converted all the code yet, so nowhere near actually building/running this.
What’s going on?
Not sure if this affects anything but I wasn’t going to uninstall the old plugins until all my new code is written, so all these are still there:
"@awesome-cordova-plugins/purchases": "^5.37.3",
"@revenuecat/purchases-capacitor": "^10.3.4",
"cordova-plugin-purchases": "^2.3.0",