Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does cordova prepare do?

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?

  1. Does it update the platform-specific www folders?
    • If yes, does it copy the full content of the root www?
  2. Does it update the platform-specific icons?
    • If yes, where should the source icons be located?
  3. Does it update the platform-specific splash screens?
    • If yes, where should the source splash screens be located?
  4. Does it update other platform-specific resources?
  5. Does it update the Android manifest?
    • If yes, how can I customize the manifest, so that cordova prepare merges both the customization and the generated lines?
  6. Which other files are updated for the Android platform?
  7. Which other files are updated for the iOS platform?
like image 954
jeromerg Avatar asked May 23 '14 08:05

jeromerg


People also ask

What does ionic prepare do?

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.

What does cordova Clean do?

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.

What is cordova and how it works?

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.

What does cordova build command do?

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.


2 Answers

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

like image 143
Vaibhav Jain Avatar answered Oct 21 '22 21:10

Vaibhav Jain


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

like image 28
Ali Gonabadi Avatar answered Oct 21 '22 20:10

Ali Gonabadi