Install cordova plugin for ONE platform only

I’ve found that the only clean way to make it work is to modify 3 things:

  1. Edit the plugins/PLATFORM.js file (ex. plugins/android.js) and remove the plugin object from the “installed_plugins” array
  2. Do the same for the platforms/PLATFORM/www/cordova_plugins.js file where PLATFORM could be ios, blackberry10, firefoxos etc. In the android case will be inside assets/www instead of just www
  3. Last step is to delete the plugin directory inside platforms/PLATFORM/www/plugins/. In your case again it will be assets/www and not just www

Leave a Comment

error code: 521