Using Cordova Plugins
Capacitor comes with full Cordova plugin compatibility, so using existing Cordova plugins in Capacitor is easy.
Installing Cordova Plugins
npm install your plugin of choice, sync your project, finish configuration, and you're ready to go:
npm install cool-cordova-plugin npx cap sync
Capacitor does not support Cordova install variables, auto configuration, or hooks, due to our philosophy of letting you control your native project source code (meaning things like hooks are unnecessary). If your plugin requires variables or settings to be set, you'll need to apply those configuration settings manually by mapping between the plugin's
plugin.xml and required settings on iOS and Android.
The following plugins don't work with Capacitor, or Capacitor provides a conflicting alternative. These plugins should be removed for your app:
- cordova-plugin-splashscreen: Capacitor provides its own API
While we've tested a number of popular Cordova plugins, it's possible Capacitor doesn't support every Cordova plugin. If you find an issue with an existing Cordova plugin, please file an issue with the issue you've found and the plugin information.