From aa0dc7ef0493d23d1586d9031f3c35585aacc984 Mon Sep 17 00:00:00 2001 From: Erisu Date: Mon, 24 Nov 2025 15:45:04 +0900 Subject: [PATCH 1/2] doc: update 12.x-2025.01-snapshot --- www/docs/en/12.x-2025.01/config_ref/images.md | 91 ++-- www/docs/en/12.x-2025.01/config_ref/index.md | 2 + .../guide/appdev/allowlist/index.md | 58 ++- .../guide/appdev/security/index.md | 132 ++++-- .../guide/hybrid/plugins/index.md | 441 ++++++++---------- .../guide/platforms/android/index.md | 51 +- .../guide/platforms/android/webview.md | 281 +++++++---- .../platform_plugin_versioning_ref/index.md | 401 +++++++--------- www/docs/en/12.x-2025.01/plugin_ref/spec.md | 2 +- .../reference/cordova-plugin-dialogs/index.md | 14 - .../cordova-plugin-vibration/index.md | 9 - 11 files changed, 801 insertions(+), 681 deletions(-) diff --git a/www/docs/en/12.x-2025.01/config_ref/images.md b/www/docs/en/12.x-2025.01/config_ref/images.md index 311bc8ce531..6b71913cd21 100644 --- a/www/docs/en/12.x-2025.01/config_ref/images.md +++ b/www/docs/en/12.x-2025.01/config_ref/images.md @@ -45,19 +45,11 @@ 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` -The following configuration can be used to define a single default icon -which will be used for all platforms. -```xml - -``` -For each platform, you can also define a pixel-perfect icon set to fit -different screen resolutions. - ## Android -Instead of using a single image for an icon, you can use two images (background and foreground) to create an **Adaptive Icon**. To use Adaptive Icons in Cordova, at minimum **Cordova CLI** 9.0.0 and **Cordova-Android** 8.0.0 is required. +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. -Android 13 has introduced themed icons which are monochrome images appended to the existing **Adaptive Icons**. To use Themed Icon in Cordova, at minimum **Cordova CLI** 12.0.0 and **Cordova-Android** 12.0.0 is required. +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 --------------|-------------------------------------------------------------------------------- @@ -71,6 +63,7 @@ density | *Required*
Specified icon density 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 @@ -85,6 +78,7 @@ To use the adaptive icons the `background`, `foreground` and optionally `monochr **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 @@ -99,6 +93,7 @@ To use the adaptive icons the `background`, `foreground` and optionally `monochr **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 @@ -143,7 +138,8 @@ In the `config.xml`, we will add `resource-file` to copy the `colors.xml` into t ``` -### See Also +**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) @@ -152,43 +148,54 @@ In the `config.xml`, we will add `resource-file` to copy the `colors.xml` into t Icons are not applicable to the Browser platform. ## iOS + ```xml - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + ``` -### See Also -- [App Icons on iPad and iPhone](https://developer.apple.com/library/content/qa/qa1686/_index.html) + +**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/ diff --git a/www/docs/en/12.x-2025.01/config_ref/index.md b/www/docs/en/12.x-2025.01/config_ref/index.md index 21915dffb1b..df0dd925575 100644 --- a/www/docs/en/12.x-2025.01/config_ref/index.md +++ b/www/docs/en/12.x-2025.01/config_ref/index.md @@ -325,12 +325,14 @@ android-compileSdkVersion
{% cdv_vartype number %} {% cdv_platform android % android-buildToolsVersion
{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]*
Expects a full version string eg. "32.0.0". Changing this may also requires changing the PATH environment variable to find the proper build tools.

This preference is primarily for cordova development, for testing upcoming versions of the Android SDK. Changing this has a high risk of breaking builds as newer build tools frequently introduce breaking changes. GradleVersion
{% cdv_vartype string %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]*
Sets the gradle wrapper version to use.

This preference is primarily for cordova development, for testing upcoming versions of the Android SDK. Changing this has a high risk of breaking builds as newer build tools frequently introduce breaking changes. AndroidGradlePluginVersion
{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]*
Sets the Android Gradle Plugin version to use.

This preference is primarily for cordova development, for testing upcoming versions of the Android SDK. Changing this has a high risk of breaking builds as newer build tools frequently introduce breaking changes. +AndroidShowDeprecations
{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: false*
Prints deprecation warnings for the android platform in the build output.

This preference is primarily intended for cordova core and plugin development. AndroidXAppCompatVersion
{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]*
Overrides Android App Compat library version. AndroidXWebKitVersion
{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]*
Overrides Android WebKit library version. AppendUserAgent
{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | If set, the value will append to the end of old UserAgent of webview. When using with OverrideUserAgent, this value will be ignored. AutoHideSplashScreen
{% cdv_vartype boolean %} {% cdv_platform android %} {% cdv_platform ios %} | *Default: true*
Indicates whether to hide splash screen automatically or not. The splash screen is hidden after the amount of time specified in the `SplashScreenDelay` preference. BackgroundColor
{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | Sets the app's background color. Supports a four-byte hex value, with the first byte representing the alpha channel, and standard RGB values for the following three bytes. CordovaWebViewEngine
{% cdv_vartype string %} {% cdv_platform ios %} | *Default: CDVWebViewEngine*
This sets the WebView engine plugin to be used to render the host app. The plugin must conform to the CDVWebViewEngineProtocol protocol. The 'value' here should match the 'feature' name of the WebView engine plugin that is installed. This preference usually would be set by the WebView engine plugin that is installed, automatically. +CrashRecoveryBehavior
{% cdv_vartype string %} {% cdv_platform ios %} | *Default: refresh*
Allowed values: refresh, reload
Specifies the crash recovery behavior for the iOS web view. The `reload` option will cause the web view to reload the starting URL for the app, whereas `refresh` will attempt to restore the current URL state. DefaultVolumeStream
{% cdv_vartype string %} {% cdv_platform android %} | *Default: default*
Added in cordova-android 3.7.0, This preference sets which volume the hardware volume buttons link to. By default this is "call" for phones and "media" for tablets. Set this to "media" to have your app's volume buttons always change the media volume. Note that when using Cordova's media plugin, the volume buttons will dynamically change to controlling the media volume when any Media objects are active. DisallowOverscroll
{% cdv_vartype boolean %} {% cdv_platform ios %} {% cdv_platform android %} | *Default: false*
Set to **true** if you don't want the interface to display any feedback when users scroll past the beginning or end of content. On iOS, overscroll gestures cause content to bounce back to its original position. on Android, they produce a more subtle glowing effect along the top or bottom edge of the content.
EnableViewportScale
{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false*
Set to true to allow a viewport meta tag to either disable or restrict the range of user scaling, which is enabled by default. Place a viewport such as the following in the HTML to disable scaling and fit content flexibly within the rendering WebView:
`````` diff --git a/www/docs/en/12.x-2025.01/guide/appdev/allowlist/index.md b/www/docs/en/12.x-2025.01/guide/appdev/allowlist/index.md index d3145d0108b..885e8c33f18 100644 --- a/www/docs/en/12.x-2025.01/guide/appdev/allowlist/index.md +++ b/www/docs/en/12.x-2025.01/guide/appdev/allowlist/index.md @@ -85,7 +85,7 @@ By default navigations are only allowed to `file://` URLs. To allow others URLs, to the host, or as a suffix to the path --> - @@ -141,10 +141,54 @@ Note: `allow-navigation` takes precedence over `allow-intent`. Allowing navigati ## Content Security Policy (CSP) -Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly). +The [**Content Security Policy (CSP)**](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) `` tag is a very powerful mechanism that allows you to control trusted sources of content. You can restrict various content types and domains from which content can be loaded from. Unsafe and risky HTML and JavaScript can also be disabled to further increase the security of your app. + +The CSP `` tag should be placed in your app's index.html file. On Android and iOS, the network request allow list (see above) is not able to filter all types of requests (e.g. `