

Retrieves the pinned version of cordova-android platform from npm, adds it to the project and updates the package.json file.Ĭordova platform add the cordova-android platform version 7.1.4 from npm, adds it to the project and updates the package.json file.Ĭordova platform add github:apache/cordova-android To save a platform, issue the following command:Ĭordova platform add ] | directory | git_url> -nosave This feature makes it easier to share the project and reduce the amount of redundant code that is checked in the repository. One scenario where save/restore capabilities come in handy is in large teams that work on an app, with each team member focusing on a platform or plugin.

The restore step happens automatically when a cordova prepare is issued, making use of information previously saved in the package.json and config.xml files. The recommended method of adding and removing plugins and platforms is with the Cordova CLI commands cordova plugin add|remove. It is not possible to remove plugins or platforms in this manner. It is also possible to add a platform or plugin by editing the package.json file directly, assuming you know the right tags and syntax. When adding a platform or plugin, details about the app's platform and plugin versions are automatically saved to the package.json file. This feature allows developers to save and restore their app to a known state without having to check in all of the platform and plugin source code. Cordova provides the ability to save and restore platforms and plugins.
