ios - Ionic CLI 3.8 Update - Cordova is not available -


background

after updating ionic cli on 2 separate ionic apps (for verification of error), have tried compiling, building, running, , emulating these apps both on iphone , on xcode emulator. here warning received after update:

> twine-app@0.0.1 run /users/anthony/dev/twine-app > ionic cordova run ios --l --consolelogs  ✖ cordova platform add ios --save - failed! [warn] platform added. saving platforms config.xml. ✔ cordova platform save - done! [warn] detected @ionic/cli-plugin-cordova in package.json.         of cli 3.8, no longer needed. can uninstall it.  [warn] multiple network interfaces detected! 

so, after seeing warning, tried running app both using livereload on iphone , in xcode emulator using following lines of code:

ionic cordova run ios --livereload --consolelogs 

and

ionic cordova emulate ios --livereload --consolelogs 

error

after that, began receiving warning on call of every cordova plugin stating cordova not available:

examples include not limited to:

[00:44:00]  console.warn: native: tried calling statusbar.styledefault, cordova not available. make sure              include cordova.js or run in device/simulator  [00:44:00]  console.warn: native: tried calling splashscreen.hide, cordova not available. make sure include              cordova.js or run in device/simulator  [00:44:00]  console.warn: native: tried calling speechrecognition.requestpermission, cordova not available. make              sure include cordova.js or run in device/simulator  

approach

here i've tried fix these errors , outcomes:

  1. ionic cordova build ios: cordova plugins work on actual device , loaded fine no error. however, isn't fix since need livereload test apps.

  2. ionic cordova platform rm ios && ionic cordova platform add ios: removing , adding ios platform ineffective.

  3. npm install -g ionic@latest cordova@latest --save: removing ionic , cordova npm packages , installing them doesn't anything, either.

  4. npm i: removing node_modules , installing modules again doesn't fix issue.

  5. fetch-plugins: installing this package, deleting plugins folder in root project directory, , calling fetch-plugins has no effect.

as issue has come on both of ionic apps developing, i'm afraid more people come across issue upon updating ionic clis. if has clue how go solving issue, please comment below or post solution. thank in advance.

the ionic team released ionic cli 3.8.1 shortly after 3.8 release, had fix error run following command:

ionic cordova emulate --address=localhost -slc ios

and received option upgrade ionic cli:

? ionic cli (local version) has update available (3.8.0 => 3.8.1)!  install it? yes ✔ npm install --save-dev --save-exact ionic@latest - done!  [ok] updated ionic cli 3.8.1! 🎉 

all cordova plugins working fine now.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -