cordovacordova-plugins

Error with cordova-universal-links-plugin: xmlPreferences.hasOwnProperty is not a function


I have a Cordova project using Vue and I'm using Cordova Android version 11. After adding the cordova-universal-links-plugin, I'm getting the following error during serve/build time: "xmlPreferences.hasOwnProperty is not a function".

Has anyone encountered this error before? Any suggestions on how to resolve it would be greatly appreciated.


Solution

  • I found a solution! The plugin is without any updates since 4 years ago. Searching for a forks of that plugin you will see some of them updated recently, with a solution for the problem, like this one: https://github.com/e-imaxina/cordova-plugin-deeplinks/commit/04d7bf8db0c0ae0f26127a6e1eb43dce38a80784

    You can use any of them or make your own fork of the plugin.

    Hope it helps.