When running in an iOS simulator I got this error: Error: Uncaught (in promise): TypeError: Object(WEBPACK_IMPORTED_MODULE_0__ionic_native_core[“cordova”]) is not a function.
Seems pretty strange to me, unless latest release has only been checked against Ionic 4…
Any idea is appreciated.
Landed on this page as i have similar errors with two other modules, maybe they are not related but i feel they are in common (at least in time i wasted on them).
@ionic-native/device/ngx
ERROR TypeError: Object(...) is not a function
at Device.get [as uuid]
And
@ionic-native/network-interface/ngx)
ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
Well, I forgot to “close” this issue, thanks to bump back to me.
The problem relates to the release of Ionic 4 and the fact that the documentation refers ONLY to it, without making it clear. There should be a clear evidence on the page (https://ionicframework.com/docs/native/unique-device-id) that the instructions to install it are for Ionic 4 ONLY.
If, by chance, you click on the V3 link at the top right of the page, you are not directed to instructions for V3 for this specific plugin, but to the root of the docs…
So, to find the correct instructions to load your plugin with Ionic 3, just add a /v3/ in the url, just after docs: https://ionicframework.com/docs/v3/native/unique-device-id/