From b1a610d2b6a0b3c7be291575585680e73efecb2c Mon Sep 17 00:00:00 2001 From: Erisu Date: Tue, 25 Nov 2025 15:51:25 +0900 Subject: [PATCH] doc: create 13.x-2025.11 snapshot --- VERSION | 2 +- www/_data/toc/en_13-x-2025-11-src.yml | 86 ++ www/docs/en/13.x-2025.11/config_ref/images.md | 245 +++++ www/docs/en/13.x-2025.11/config_ref/index.md | 528 ++++++++++ .../en/13.x-2025.11/cordova/events/events.md | 406 ++++++++ .../13.x-2025.11/cordova/storage/storage.md | 240 +++++ .../core/features/splashscreen/index.md | 588 +++++++++++ .../guide/appdev/allowlist/index.md | 257 +++++ .../13.x-2025.11/guide/appdev/hooks/index.md | 406 ++++++++ .../guide/appdev/privacy/index.md | 113 +++ .../guide/appdev/security/index.md | 170 ++++ www/docs/en/13.x-2025.11/guide/cli/index.md | 244 +++++ .../en/13.x-2025.11/guide/cli/installation.md | 86 ++ .../en/13.x-2025.11/guide/cli/template.md | 75 ++ .../guide/hybrid/plugins/index.md | 301 ++++++ .../guide/hybrid/webviews/index.md | 39 + www/docs/en/13.x-2025.11/guide/next/index.md | 222 +++++ .../en/13.x-2025.11/guide/overview/index.md | 164 +++ .../guide/overview/project-structure.md | 113 +++ .../guide/platforms/android/index.md | 942 ++++++++++++++++++ .../guide/platforms/android/plugin.md | 535 ++++++++++ .../guide/platforms/android/upgrade.md | 659 ++++++++++++ .../guide/platforms/android/webview.md | 259 +++++ .../guide/platforms/electron/index.md | 466 +++++++++ .../13.x-2025.11/guide/platforms/ios/index.md | 336 +++++++ .../guide/platforms/ios/plugin.md | 462 +++++++++ .../guide/platforms/ios/upgrade.md | 855 ++++++++++++++++ .../guide/platforms/ios/webview.md | 224 +++++ .../en/13.x-2025.11/guide/support/index.md | 198 ++++ www/docs/en/13.x-2025.11/index.md | 23 + .../en/13.x-2025.11/platform_pinning/index.md | 71 ++ .../platform_plugin_versioning_ref/index.md | 287 ++++++ .../en/13.x-2025.11/plugin_ref/plugman.md | 276 +++++ www/docs/en/13.x-2025.11/plugin_ref/spec.md | 674 +++++++++++++ .../reference/cordova-cli/index.md | 589 +++++++++++ .../cordova-plugin-battery-status/index.md | 113 +++ .../reference/cordova-plugin-camera/index.md | 735 ++++++++++++++ .../reference/cordova-plugin-device/index.md | 338 +++++++ .../reference/cordova-plugin-dialogs/index.md | 277 +++++ .../reference/cordova-plugin-file/index.md | 903 +++++++++++++++++ .../cordova-plugin-geolocation/index.md | 799 +++++++++++++++ .../cordova-plugin-inappbrowser/index.md | 727 ++++++++++++++ .../cordova-plugin-media-capture/index.md | 637 ++++++++++++ .../reference/cordova-plugin-media/index.md | 712 +++++++++++++ .../index.md | 320 ++++++ .../index.md | 127 +++ .../cordova-plugin-splashscreen/index.md | 188 ++++ .../cordova-plugin-statusbar/index.md | 292 ++++++ .../cordova-plugin-vibration/index.md | 143 +++ www/docs/en/13.x-2025.11/third-party/index.md | 58 ++ 50 files changed, 17509 insertions(+), 1 deletion(-) create mode 100644 www/_data/toc/en_13-x-2025-11-src.yml create mode 100644 www/docs/en/13.x-2025.11/config_ref/images.md create mode 100644 www/docs/en/13.x-2025.11/config_ref/index.md create mode 100644 www/docs/en/13.x-2025.11/cordova/events/events.md create mode 100644 www/docs/en/13.x-2025.11/cordova/storage/storage.md create mode 100644 www/docs/en/13.x-2025.11/core/features/splashscreen/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/appdev/allowlist/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/appdev/hooks/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/appdev/privacy/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/appdev/security/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/cli/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/cli/installation.md create mode 100644 www/docs/en/13.x-2025.11/guide/cli/template.md create mode 100644 www/docs/en/13.x-2025.11/guide/hybrid/plugins/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/hybrid/webviews/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/next/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/overview/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/overview/project-structure.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/android/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/android/plugin.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/android/upgrade.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/android/webview.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/electron/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/ios/index.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/ios/plugin.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/ios/upgrade.md create mode 100644 www/docs/en/13.x-2025.11/guide/platforms/ios/webview.md create mode 100644 www/docs/en/13.x-2025.11/guide/support/index.md create mode 100644 www/docs/en/13.x-2025.11/index.md create mode 100644 www/docs/en/13.x-2025.11/platform_pinning/index.md create mode 100644 www/docs/en/13.x-2025.11/platform_plugin_versioning_ref/index.md create mode 100644 www/docs/en/13.x-2025.11/plugin_ref/plugman.md create mode 100644 www/docs/en/13.x-2025.11/plugin_ref/spec.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-cli/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-battery-status/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-camera/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-device/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-dialogs/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-file/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-geolocation/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-inappbrowser/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-media-capture/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-media/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-network-information/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-screen-orientation/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-splashscreen/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-statusbar/index.md create mode 100644 www/docs/en/13.x-2025.11/reference/cordova-plugin-vibration/index.md create mode 100644 www/docs/en/13.x-2025.11/third-party/index.md diff --git a/VERSION b/VERSION index b44a2dcb351..3c4f918762e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.x-2025.01 +13.x-2025.11 diff --git a/www/_data/toc/en_13-x-2025-11-src.yml b/www/_data/toc/en_13-x-2025-11-src.yml new file mode 100644 index 00000000000..6e81cb676da --- /dev/null +++ b/www/_data/toc/en_13-x-2025-11-src.yml @@ -0,0 +1,86 @@ +- + name: Getting Started + children: + - url: guide/overview/index.html + - url: guide/cli/installation.html + - url: guide/cli/index.html + +- + name: Cordova Projects + children: + - url: guide/overview/project-structure.html + - url: reference/cordova-cli/index.html + - url: guide/support/index.html + - url: platform_pinning/index.html + - url: platform_plugin_versioning_ref/index.html + - url: guide/appdev/hooks/index.html + +- + name: App Development + children: + - + name: Platforms + children: + - url: guide/platforms/android/index.html + - url: guide/platforms/ios/index.html + - url: guide/platforms/electron/index.html + - + name: Customization + children: + - url: config_ref/images.html + - url: core/features/splashscreen/index.html + - + name: Security & Privacy + children: + - url: guide/appdev/security/index.html + - url: guide/appdev/privacy/index.html + - url: guide/appdev/allowlist/index.html + - url: cordova/storage/storage.html + +- + name: Plugin Development + children: + - url: guide/hybrid/plugins/index.html + - + name: Support a Platform + children: + - url: guide/platforms/android/plugin.html + - url: guide/platforms/ios/plugin.html + - url: plugin_ref/plugman.html + +- + name: References + children: + - url: config_ref/index.html + - url: plugin_ref/spec.html + - url: cordova/events/events.html + +- + name: Resources + children: + - url: third-party/index.html + - url: guide/cli/template.html + - url: guide/next/index.html + +- + name: Plugins + children: + - url: reference/cordova-plugin-battery-status/index.html + - url: reference/cordova-plugin-camera/index.html + - url: reference/cordova-plugin-device/index.html + - url: reference/cordova-plugin-dialogs/index.html + - url: reference/cordova-plugin-file/index.html + - url: reference/cordova-plugin-geolocation/index.html + - url: reference/cordova-plugin-inappbrowser/index.html + - url: reference/cordova-plugin-media/index.html + - url: reference/cordova-plugin-media-capture/index.html + - url: reference/cordova-plugin-network-information/index.html + - url: reference/cordova-plugin-screen-orientation/index.html + - url: reference/cordova-plugin-splashscreen/index.html + - url: reference/cordova-plugin-statusbar/index.html + - url: reference/cordova-plugin-vibration/index.html + +- + name: Advanced Topics + children: + - url: guide/hybrid/webviews/index.html diff --git a/www/docs/en/13.x-2025.11/config_ref/images.md b/www/docs/en/13.x-2025.11/config_ref/images.md new file mode 100644 index 00000000000..6b71913cd21 --- /dev/null +++ b/www/docs/en/13.x-2025.11/config_ref/images.md @@ -0,0 +1,245 @@ +--- +license: > + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +title: Customize App Icons +toc_title: Icons +description: Learn how to customize icons for your Cordova application. +--- + +{% cdv_platform inject %} + +# Icons + +This section shows how to configure an application's icon for various platforms. Documentation about splash screen images can be found in the Cordova-Plugin-Splashscreen documentation [Splashscreen plugin docs][splashscreen_plugin]. + +## Configuring Icons in the CLI + +When working in the CLI you can define application icon(s) via the `` element (`config.xml`). +If you do not specify an icon, the Apache Cordova logo is used. + +```xml + +``` + +Attributes | Description +--------------|-------------------------------------------------------------------------------- +src | *Required*
Location of the image file, relative to your project directory. +platform | *Optional*
Target platform +width | *Optional*
Icon width in pixels +height | *Optional*
Icon height in pixels +target | *Optional*
{% cdv_platform electron %}
Set target to supply unique icons for `app` and `installer` + +## Android + +Android's **Adaptive Icons** feature enables you to create separate foreground and background layers for your App Icons. To use Adaptive Icons in Cordova, you need at least **Cordova CLI** 9.0.0 and **Cordova-Android** 8.0.0. + +With Android 13, Google introduced **Themed Icons**, which are monochrome variations of **Adaptive Icons** that integrate seamlessly with the system's color scheme. To use **Themed Icons** in Cordova, you'll need at least **Cordova CLI** 12.0.0 and **Cordova-Android** 12.0.0. + +Attributes | Description +--------------|-------------------------------------------------------------------------------- +background | *Required for Adaptive*
Location of the image (png or vector) relative to your project directory, or color reference +foreground | *Required for Adaptive*
Location of the image (png or vector) relative to your project directory, or color reference +monochrome | *Optional for Adaptive but required for themed icons*
Location of the image (png or vector) relative to your project directory +density | *Required*
Specified icon density + +### Adaptive Icons + +To use the adaptive icons the `background`, `foreground` and optionally `monochrome` attributes must be defined in place of the `src` attribute. The `src` attribute is not used for adaptive icons. + +#### Adaptive Icon with Images: + +```xml + + + + + + + + +``` + +**Note:** In this example, the foreground image will also be used as the fallback icon for Android devices that do not support the adaptive icons. The fallback icon can be overridden by setting the src attribute. + +#### Adaptive Icon with Vectors: + +```xml + + + + + + + + +``` + +**Note:** In this example, the src attribute must be defined when then foreground attribute is defined with a vector or color. + +#### Adaptive Icon with Colors: + +Create a `res/values/colors.xml` resource file in your project directory to store the app's color definitions. +```xml + + + #FF0000 + +``` + +In the `config.xml`, we will add `resource-file` to copy the `colors.xml` into the approprate location so that the colors are available during build time. + +```xml + + + + + + + + + + +``` + +### Standard Icons + +```xml + + + + + + + + + +``` + +**See Also:** + +- [Android icon guide](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) +- [Android Adaptive icons - User theming](https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#user-theming) +- [Android - Supporting multiple screens](https://developer.android.com/guide/practices/screens_support.html) + +## Browser +Icons are not applicable to the Browser platform. + +## iOS + +```xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +**Notes:** + +- Alpha channel is not supported for any iOS icons. + +**References:** + +- [Apple Developer - Configuring your app icon](https://developer.apple.com/documentation/xcode/configuring-your-app-icon/) +- [Apple Developer - Human Interface Guidelines > App icons](https://developer.apple.com/design/human-interface-guidelines/app-icons) + +[splashscreen_plugin]: ../reference/cordova-plugin-splashscreen/ + +## Electron + +### Customizing the Application's Icon + +Customized icon(s) can be declared with the `` element(s) in the `config.xml` file. There are two types of icons that can be defined, the application icon and the package installer icon. These icons should be defined in the Electron's platform node ``. + +One icon can be used for the application and installer, but this icon should be at least **512x512** pixels to work across all operating systems. + +_Notice: If a customized icon is not provided, the Apache Cordova default icons are used._ + +_Notice: macOS does not display custom icons when using `cordova run`. It defaults to the Electron's icon._ + +```xml + + + +``` + +You can supply unique icons for the application and installer by setting the `target` attribute. As mentioned above, the installer image should be **512x512** pixels to work across all platforms. + +```xml + + + + +``` + +For devices that support high-DPI resolutions, such as Apple's Retina display, you can create a set of images with the same base filename but suffix with its multiplier. + +For example, if the base image's filename `icon.png` and is the standard resolution, then `icon@2x.png` will be treated as a high-resolution image that with a DPI doubled from the base. + +- icon.png (256px x 256px) +- icon@2x.png (512px x 512px) + +If you want to support displays with different DPI densities at the same time, you can put images with different sizes in the same folder and use the filename without DPI suffixes. For example: + +```xml + + + + + + +``` diff --git a/www/docs/en/13.x-2025.11/config_ref/index.md b/www/docs/en/13.x-2025.11/config_ref/index.md new file mode 100644 index 00000000000..df0dd925575 --- /dev/null +++ b/www/docs/en/13.x-2025.11/config_ref/index.md @@ -0,0 +1,528 @@ +--- +license: > + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +title: Config.xml API +description: List of supported tags in the config.xml file. +--- + +{% cdv_platform inject %} + +# Config.xml API + +The `config.xml` file is a global configuration file that manages various aspects of a Cordova application's behavior. It is written in XML format and follows the structure outlined in the W3C's [Packaged Web Apps (Widgets)](https://www.w3.org/TR/widgets/) specification. Additionally, it is extended to include core Cordova API features, plugins, and platform-specific settings. + +If you are using the Cordova CLI to create your project (as explained in [The Command-Line Interface](../guide/cli/index.html)), you can locate the `config.xml` file in the top-level directory of your project. + +```bash +./hellocordova +└── config.xml +``` + +When using the CLI to build a project, versions of this file are passively copied into various `platforms/` subdirectories. For example: + +```bash +./hellocordova +└── platforms + ├── android + │   └── app + │   └── src + │   └── main + │   └── res + │   └── xml + │   └── config.xml + └── ios + └── HelloCordova + └── config.xml +``` + +Some platforms offer integrated development environments (IDEs) like Xcode for iOS and Android Studio for Android, which allow you to build and test your application. If you choose to use these IDEs for building and testing your project, it is recommended to run the `cordova prepare` CLI command whenever you make changes to the Cordova application's `config.xml`. This ensures that the updated configurations are copied into the respective `platforms/` subdirectories. + +In addition to the configuration options described below, you have the ability to customize the core set of images for your application on each target platform. For more information, please refer to the topic on [Customizing Icons](images.html). + +**Sample `config.xml`:** + +```xml + + + HelloCordova + Sample Apache Cordova App + + Apache Cordova Team + + + + + + + + + + + + + +``` + +## widget + +Root element of the config.xml document. + +Attributes | Description +---------------- | ------------ +id
{% cdv_vartype string %} | *Required*
Specifies the app's identifier. The `id` should be in a [reverse-DNS format](https://en.wikipedia.org/wiki/Reverse_domain_name_notation#Examples) however, only alphanumeric and dot characters are allowed. e.g: `com.example.myapp` +version
{% cdv_vartype string %} | *Required*
Full version number expressed in major/minor/patch notation. +android-versionCode
{% cdv_vartype string %} {% cdv_platform android %} | Alternative version for Android. Sets the [version code](https://developer.android.com/tools/publishing/versioning.html) for the application. See [the Android guide](../guide/platforms/android/index.html#setting-the-version-code) for information on how this attribute may be modified. +ios-CFBundleVersion
{% cdv_vartype string %} {% cdv_platform ios %} | Alternative version for iOS. For further details, see [Apple Developer - CFBundleVersion](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion). +android-packageName
{% cdv_vartype string %} {% cdv_platform android %} | This preference overrides the id attribute with an alternative package name specifically for Android. +ios-CFBundleIdentifier
{% cdv_vartype string %} {% cdv_platform ios %} | This preference overrides the id attribute with an alternative bundle ID specifically for iOS. +defaultlocale
{% cdv_vartype string %}{% cdv_platform ios %} | Specify the default language of the app using an IANA language code. This preference key explicitly sets the value for [CFBundleDevelopmentRegion](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundledevelopmentregion). For example, you can use values like `en` or `en_US`. +android-activityName
{% cdv_vartype string %} {% cdv_platform android %} | Set the activity name for your app in AndroidManifest.xml. Note that this is only set once after the Android platform is first added. +xmlns
{% cdv_vartype string %} | *Required*
Namespace for the config.xml document. +xmlns:cdv
{% cdv_vartype string %} | *Required*
Namespace prefix. + +Examples: + +```xml + + + + + + + +``` + +## name + +Specifies the app's formal name, as it appears on the device's home screen and within app-store interfaces. + +Examples: + +```xml + + HelloCordova + +``` + +### short name + +Specifies an optional display name for the app. Sometimes the app name should be displayed differently on device's home screen than on informational and app-store interfaces due to limited space. + +Examples: + +```xml + + HelloCordova + +``` + +## description + +Specifies metadata that may appear within app-store listings. + +Examples: + +```xml + + A sample Apache Cordova application + +``` + +## author + +Specifies contact information that may appear within app-store listings. + +Attributes | Description +----------------- | ------------ +email
{% cdv_vartype string %} | *Required*
Email of the author. +href
{% cdv_vartype string %} | *Required*
Website of the author. + +Examples: + +```xml + + + +``` + + +## content + +Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level ```www``` directory. + +Attributes | Description +----------------- | ------------ +src
{% cdv_vartype string %} | *Required*
Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level ```www``` directory. + +Examples: + +```xml + + + +``` + +## access + +Defines the external domains that the app is allowed to communicate with. When the access origin is set to "*", the app can access any server, but this can potentially create a security risk. It is recommended to explicitly specify the permitted URLs to ensure a secure configuration. For detailed instructions, please refer to the [Allow List Guide](../guide/appdev/allowlist/index.html). + +Attributes | Description +----------------- | ------------ +origin
{% cdv_vartype string %} | *Required*
Defines the external domain URL or URL pattern that the app is allowed to communicate with. + +Examples: + +```xml + + + + + + + +``` + +## allow-navigation + +Controls which URLs the WebView can be navigated to. Applies to top-level navigations only. See the [Allow List Guide][allow_list_navigation] for details. + +Attributes | Description +----------------- | ------------ +href
{% cdv_vartype string %} | *Required*
Defines the external domain or domain pattern that the WebView is allowed to navigate to. + +Examples: + +```xml + + + + + +``` + +## allow-intent + +Controls which URLs the app is allowed to ask the system to open. By default, no external URLs are allowed. See the [Allow List Guide][allow_list_intent] for details. + +Attributes | Description +----------------- | ------------ +href
{% cdv_vartype string %} | *Required*
Defines the URL or URL pattern that the app is allowed to ask the system to open. + +Examples: + +```xml + + + + +``` + +## edit-config + +See [<config-file> docs][edit_config] for plugin.xml. + +## config-file + +See [<config-file> docs][config_file] for plugin.xml. + +## engine + +Specifies details about what platform to restore during a prepare. + +Attributes | Description +----------------- | ------------ +name
{% cdv_vartype string %} | *Required*
Name of the platform to be restored +spec
{% cdv_vartype string %} | *Required*
Details about the platform to be restored. This could be a ```major.minor.patch``` version number, a directory containing the platform or a url pointing to a git repository. This information will be used to retrieve the platform code to restore from NPM, a local directory or a git repository. See [Platform Spec][platform_spec] for further details. + +Examples: + +```xml + + +``` + +## plugin + +Specifies details about what plugin to restore during a prepare. This element +is automatically added to a project's `config.xml` when a plugin is added using +the `--save` flag. See the [CLI reference][plugin_cli] for more information on +adding plugins. + +_Note: As of Cordova 9.x, this tag is obsolete. [Learn More](https://github.com/apache/cordova-lib/pull/750)_ + +Attributes | Description +----------------- | ------------ +name
{% cdv_vartype string %} | *Required*
Name of the plugin to be restored +spec
{% cdv_vartype string %} | *Required*
Details about the plugin to be restored. This could be a ```major.minor.patch``` version number, a directory containing the plugin or a url pointing to a git repository. This information will be used to retrieve the plugin code to restore from NPM, a local directory or a git repository. See [Plugin Spec][plugin_spec] for further details. + +Examples: + +```xml + + +``` + +### variable + +Persists the value of a CLI variable to be used when restoring a plugin during a +prepare. This element is added to `config.xml` when a plugin that uses CLI variables +is added using the `--save` flag. See the [CLI reference][plugin_cli] for more +information on adding plugins. + +Note that this value is only used when the plugin is restored to the project during a +prepare, changing it will *not* change the value used by the plugin in the current +project. In order for changes to this value to take effect, remove the plugin from the +project and restore it by running `cordova prepare`. See the +[preference element][plugin_preference] of `plugin.xml` for more details on CLI variables. + +Attributes | Description +----------------- | ------------ +name
{% cdv_vartype string %} | *Required*
Name of the CLI variable. Can only contain capital letters, digits, and underscores. +value
{% cdv_vartype string %} | *Required*
Value of the CLI variable to be used when restoring the parent plugin during a prepare. + +Examples: + +```xml + + + +``` + +## preference + +Sets various options as pairs of name/value attributes. Each preference's name is case-insensitive. Many preferences are unique to specific platforms, +and will be indicated as such. + +Attributes | Description +----------------- | ------------ +AllowInlineMediaPlayback
{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false*
Set to true to allow HTML5 media playback to appear inline within the screen layout, using browser-supplied controls rather than native controls. For this to work, add the ```playsinline``` attribute to any ```