arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

TypeError:is not a function in iOS platform #1143

Open VinlorJiang opened 4 years ago

VinlorJiang commented 4 years ago

Describe the bug I use the below methods to add firebase to my project:

  1. ionic cordova plugin add cordova-plugin-firebase
  2. npm install @ionic-native/firebase
  3. import { Firebase } from '@ionic-native/firebase/ngx';

But when i call the method of startTrace then show error. 1.this._firebase.startTrace('123456'); 2.ERROR: ERROR TypeError: Object(WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"])(this, "startTrace", {}, arguments)', 'Object(WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"])' is an instance of Object)

I don't know how to solve the issue, pls give me some thinks. Thanks very much!