I checked the documentation but didn't find a clear explanation about this command.
So does anyone know what exactly does the command cordova prepare
do?
www
folders?
www
?cordova prepare
merges both the customization and the generated lines?1. ionic prepare copies all files from the www folder into the target platform's www folder. 2. ionic build also does this, but also builds the app's source code so that it can be run on a simulator/emulator or a device.
Prevents Android from being installed / removed on platform steps. Makes plugin / platform checks only based off of name (no version check). This forces plugins / platforms added from git or local to be re-added during sync.
Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language.
By default, cordova create script generates a skeletal web-based application whose start page is the project's www/index. html file. Any initialization should be specified as part of the deviceready event handler defined in www/js/index.
Cordova prepare: It prepares [<platform> [..]]
by copying the necessary files into the specified platform folder, or for all platform folders. The project is then ready to be built by Eclipse, Xcode, etc.
Refer to: Cordova Commands
As documentation says:
In this case, once you run prepare, you can use Apple's Xcode SDK as an alternative to modify and compile the platform-specific code that Cordova generates within platforms/ios. You can use the same approach with other platforms' SDKs.
Refer : Apache Cordova API Documentation
In Cordova 5, a new cool feature has been added to the cordova prepare
command:
<feature>
tags have been renamed to tags in your projects config.xml. Adding a<plugin>
tag to your config.xml will fetch and install it on cordova prepare if it isn’t already installed.
http://cordova.apache.org/news/2015/04/21/tools-release.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With