Search code examples
androidionic-frameworkcapacitor

Ionic Capacitor: How to upgrade my Google Play billing library version to 5.0 for android


I have a Ionic application running with capacitor. I have my android app deployed but after logging into my google play dev account I am seeing the current notice:

We've detected that this app is using an old version of Google Play Billing. From November 1, 2023, all app updates must use Billing Library version 5 or newer.

Action required: Please verify your publicly available APKs are updated to the latest version of the Play Billing Library. This includes any APK or App Bundle rolled out in production.

I am wondering how I can upgrade properly to the Billing version 5 or newer. Below are my current configs:

    "cordova-plugin-purchase": "^11.0.0",
    "cordova-plugin-purchases": "^2.4.0",
    "@ionic-native/in-app-browser": "^5.36.0",
    "@ionic-native/in-app-purchase-2": "^5.36.0",
    "@ionic-native/app-version": "^5.36.0",
    "@ionic-native/core": "^5.36.0",
    "@awesome-cordova-plugins/purchases": "^5.44.0",
    "@capacitor-community/sqlite": "^5.0.7-2",
    "@capacitor/android": "^5.2.3",
    "@capacitor/app": "^5.0.0",
    "@capacitor/camera": "^5.0.0",
    "@capacitor/core": "^5.0.0",

Let me know what other information to add and will add it.

Thanks for any help :)


Solution

  • You have to upgrade cordova-plugin-purchase to Version 13.

    npm install cordova-plugin-purchase@latest

    There's a migration guide here, there are a lot of breaking changes:

    https://github.com/j3k0/cordova-plugin-purchase/wiki/HOWTO:-Migrate-to-v13

    However be aware that @awesome-cordova-plugins/in-app-purchase-2 has not been updated and doesn't seem to have one coming down the line. The cordova-plugin-purchase dev is currently recommending users to remove the @awesome wrapper and directly import the store as it's now typed. Details below.

    https://github.com/danielsogl/awesome-cordova-plugins/issues/4457#issuecomment-1464871575