Install cordova plugin for ONE platform only
blackberry-10, cordova
Solution
I've found that the only clean way to make it work is to modify 3 things:
- Edit the plugins/PLATFORM.js file (ex. plugins/android.js) and remove the plugin object from the "installed_plugins" array
- 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
- 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
Problem
We want to install the com.blackberry.app plugin (http://plugins.cordova.io/#/package/com.blackberry.app) for our (cordova 3.4.0 CLI) project. IF I try "cordova plugin add com.blackberry.app", it is installing plugin for both android and blackberry10 platforms. Due to this, the android app crashes. I tried installing only this plugin for blackberry10 platform thru plugman, but the functionality doesn't work [although plugman says it successfully installed] Is there a way in CLI to install a plugin for ONE platform only? Thanks