Ionic 5 + Angular 8 + iBeacon native plugin doesn't work

Hi all!

I’m trying to integrate iBeacon plugin into my Ionic 5 App but it doesn’t work at all.

When I try to call

this.delegate = this.ibeacon.Delegate();

then on the device, I obtain the following error all the time.

vendor-es2015.js:40772 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'locationManager' of undefined
TypeError: Cannot read property 'locationManager' of undefined

it is connected with the following code in the plugin:

var delegate = new _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"].plugins.locationManager.Delegate();

I’ve added provider in the main module and also I’m using imports from ‘@ionic-native/ibeacon/ngx’

My package versions:

"@ionic/core":  "5.1.0"
"@ionic-native/core": "5.25.0"
"@ionic-native/ibeacon": "5.25.0"

I’m not sure if I’m doing something wrong or there is a bug in the plugin.

Thanks in advance for your help!

1 Like