Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a local cordova plugin with ionic / ionic 2 / ionic 3 / ionic 4 / ionic 5?

I currently develop an app with ionic, and my cordova plugin in the same time. I wanted to know how to use the file plugins/fetch.json to update my plugin from a local file system. Any idea ?

like image 585
Dev Avatar asked May 20 '15 09:05

Dev


People also ask

How do I update my Cordova plugin to Ionic?

Update Cordova CLI, cordova Then compare the returned version number to the output of npm info cordova version (You can also check manually for the newest available version on npm or GitHub). Run cordova -v again after the update to make sure the update worked and it now returns the current version.


1 Answers

To add a local plugin with ionic :

ionic cordova plugin add /path/to/my/plugin/my.plugin.folder.here/ 

to remove it :

ionic cordova plugin remove my.plugin.folder.here 

But to update it it's another problem. Actually I'm removing and installing it again after each edit. Good luck ;)

EDIT

If you are using a previous version of ionic cli, and it doesn't work, change the commands to the following :

ionic plugin add /path/to/my/plugin/my.plugin.folder.here/ 

and

ionic plugin remove my.plugin.folder.here 
like image 83
Dev Avatar answered Sep 22 '22 01:09

Dev