Adding a platform in cordova creates files & folders for that platform. This includes a folder named platform_www
for ex ios\platform_www
, The files in this folder are available in the folder www
.
Please explain use of this folder & why its required?
Prevents Android from being installed / removed on platform steps.
A plugin is a package of injected code that allows the Cordova webview within which the app renders to communicate with the native platform on which it runs. Plugins provide access to device and platform functionality that is ordinarily unavailable to web-based apps.
'cordova platform update /path/to/android/platform --save' => In addition to updating the android platform to version in the folder, update config. xml entry. 'cordova platform remove android --save' => Removes the android platform from the project and deletes its entry from config.
cordova platform add ios
creates the platform_www
directory under platforms/ios/
. This directory contains javascript files, like cordova.js
which are added to the mobile app when it's built. At this point the platforms/ios/www
directory doesn't exist yet.cordova plugin add
the platform_www
directory is updated with a javascript wrapper file pertaining to that plugin. At this point the platforms/ios/www
directory doesn't exist yet.cordova build ios
is equivalent to running cordova prepare ios
and then cordova compile ios
. The cordova prepare
command copies the user's www
directory in the root directory, and combines it with platforms\ios\platform_www
to create a new directory platforms\ios\www
.cordova clean
removes the platforms\ios\www
directory, but leaves the platforms\ios\platform_www
directory and the www
directory in place, so they can be combined in future builds. Running cordova plugin remove
removes the javascript wrapper file for a specific plugin from platforms/ios/platform_www
. And running cordova platform remove ios
will remove the platforms/ios/platform_www
directory.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