When developing an app that uses Capacitor, it's possible to use Cordova plugins.
Installing Cordova Plugins
Capacitor plugins are installed using your regular package manager and then synced to the native project(s). The installation process is the same for Cordova plugins in Capacitor.
Install the plugin, sync, and then finish any required native project configuration (see Variables and Hooks):
npm install cordova-plugin-name
npx cap sync
If the Cordova plugin has an
@awesome-cordova-pluginswrapper, you can also install it for TypeScript support:
npm install @awesome-cordova-plugins/plugin-name
Updating Cordova Plugins
Use your regular package manager to update plugins. Then, sync the updated plugin to the native project(s):
npm install [email protected]
npx cap sync
Determining Installed Plugin Version
See the list of Capacitor and Cordova plugins (and their exact version numbers) installed in your project with:
npx cap ls
There may be compatibility issues with Capacitor and some Cordova plugins. Many of the official Cordova plugins should not be used, as Capacitor offers official alternatives. Cordova plugins that use variables and hooks may be partially compatible. Some Cordova plugins are completely incompatible (see this list).
If you find an issue with an existing Cordova plugin, please let us know by providing the issue's details and plugin information.
Variables and Hooks
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.
Consult the iOS and Android configuration guides for info on how to configure each platform.
Known Incompatible Plugins
If a plugin is known to conflict or cause build issues, it will be skipped when running
npx cap sync.
Here is a list of known incompatible plugins:
cordova-plugin-add-swift-support(not needed, Capacitor has built in Swift support)
cordova-plugin-console(not needed, Capacitor has its own)
cordova-plugin-crosswalk-webview(Capacitor doesn't allow to change the webview)
cordova-plugin-ionic-keyboard(not needed, Capacitor has it's own)
cordova-plugin-ionic-webview(not needed, Capacitor uses WKWebView)
cordova-plugin-music-controls(causes build failures, skipped)
cordova-plugin-splashscreen(not needed, Capacitor has its own)
cordova-plugin-statusbar(not needed, Capacitor has its own)
cordova-plugin-wkwebview-engine(not needed, Capacitor uses WKWebView)
cordova-plugin-googlemaps(causes build failures on iOS, skipped for iOS only)