FAQ

Frequently asked questions about Awesome Cordova Plugins β€” troubleshooting builds, resolving plugin conflicts, and recommended upgrade strategies.

Cordova Management Tips

1) Use the Ionic CLIarrow-up-right to add/update/delete plugins.

Instead of directly editing config.xml and package.json. Use ionic in front of Cordova commands for a better experience and additional functionality (ionic cordova build ios instead of cordova build ios).

2) Upgrade plugins by removing, then re-adding them.

ionic cordova plugin remove cordova-plugin-camera
ionic cordova plugin add cordova-plugin-camera

3) Install explicit versions.

To ensure that the same version of a plugin is always installed via npm install, specify the version number:

ionic cordova plugin add cordova-plugin-camera@4.3.2

4) Restore Cordova in an existing Ionic project

Useful when adding new developers to a project. ionic cordova prepare restores platforms and plugins from package.json and config.xml. The version to be installed is taken from package.json or config.xml, if found in those files. In case of conflicts, package.json is given precedence over config.xml.

5) Troubleshoot Cordova issues with Ionic CLI commands

Understanding Version Numbers

For any given plugin, the Awesome Cordova Plugins (TypeScript code) and Cordova (native code) version numbers will not match. The Awesome Cordova Plugins version number is found in package.json:

The Cordova plugin version number is found in both package.json and config.xml:

When checking for new native functionality or bug fixes, look for new versions on the Cordova plugin GitHub page itself (here's the Camera onearrow-up-right, for example).

To check for new Awesome Cordova Plugins releases (may include exposing methods recently added by the Cordova plugin, etc.), see the releases pagearrow-up-right.

Troubleshooting Failed Builds

Research the build error(s) by checking out these resources:

Cordova Plugin Conflicts

Plugins can conflict with each other when they share the same underlying native dependencies or when more than one plugin tries to access the same native code at once. For example, common libraries like the Google Play Services version (Google Maps is using GPS v24.2 but Firebase wants GPS v27.1). Keeping these plugins updated regularly can help with this.

Another tip is to ensure that your app uses only one plugin per specific feature/functionality (example: Push Notifications).

The most stable apps are routinely updated, especially at the native layer. Keeping native plugins up to date ensures your project has the latest security fixes, new features, and improved performance.

Update your project's plugins one at a time, ideally in separate code branches. This reduces the surface area that issues can arise from β€” if you update everything in your project at once, it's sometimes hard to tell where the problem stems from.

When should I update?

  • When a new feature/bug fix is released: Run npm outdated to see a list of available updates.

  • When new major versions are released: Official blogs, such as the Cordova blogarrow-up-right and Ionic blogarrow-up-right, will publish announcements and news.

  • Evaluate the nature of the update: is it a shiny new feature or critical security fix?

  • Timing: Where does it fit in against your team's project goals?

Last updated