This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git
The following commit(s) were added to refs/heads/master by this push:
new f686a58507 doc: fix jekyll platform tagging (#1316)
f686a58507 is described below
commit f686a5850797d6104ccb10ab9e1eb951508c3592
Author: エリス <[email protected]>
AuthorDate: Mon May 29 23:03:07 2023 +0900
doc: fix jekyll platform tagging (#1316)
---
www/_plugins/cdv-platform-tag.rb | 21 +++++++
www/docs/en/dev/config_ref/images.md | 4 +-
www/docs/en/dev/config_ref/index.md | 116 ++++++++++++++++++-----------------
www/docs/en/dev/plugin_ref/spec.md | 42 +++++++------
www/plugins/index.html | 3 +-
www/static/css-src/main.scss | 13 ++++
6 files changed, 119 insertions(+), 80 deletions(-)
diff --git a/www/_plugins/cdv-platform-tag.rb b/www/_plugins/cdv-platform-tag.rb
new file mode 100644
index 0000000000..33f1fafb9b
--- /dev/null
+++ b/www/_plugins/cdv-platform-tag.rb
@@ -0,0 +1,21 @@
+module Jekyll
+ class CdvPlatformTag < Liquid::Tag
+
+ def initialize(tag_name, text, tokens)
+ super
+ @text = text
+ end
+
+ def render(context)
+ platform = @text.downcase.strip
+
+ if platform == 'inject'
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" hidden style=\"display:
none !important\"><symbol id=\"browser\" viewBox=\"461.6 9.3 30 30\"><path
d=\"M476.7 10.3c-7.7 0-14 6.3-14 14s6.3 14 14 14 14-6.3 14-14-6.3-14-14-14m9.8
9h-5.1c-.3-2.1-.8-4-1.4-5.5 2.8.9 5.1 2.9 6.5 5.5m-6.8 5-.1 3h-5.8l-.1-3
.1-3h5.8l.1 3m-3 11h-.9c-.6-1.1-1.4-3.1-1.8-6h5.3c-.4 2.9-1.1 4.8-1.8
6h-.8m-2.7-16c.4-2.9 1.1-4.8 1.8-6h1.8c.6 1.1 1.4 3.1 1.8 6H474zm-.6-5.5c-.6
1.5-1.1 3.4-1.4 5.5h-5.1c1.3-2.6 3.6-4.6 6. [...]
+ else
+ "<svg class=\"platform-icon #{platform}\"><use href=\"\##{platform}\"
/></svg>"
+ end
+ end
+ end
+end
+
+Liquid::Template.register_tag('cdv_platform', Jekyll::CdvPlatformTag)
diff --git a/www/docs/en/dev/config_ref/images.md
b/www/docs/en/dev/config_ref/images.md
index 8874f9c5c6..4573542965 100644
--- a/www/docs/en/dev/config_ref/images.md
+++ b/www/docs/en/dev/config_ref/images.md
@@ -22,6 +22,8 @@ toc_title: Customize icons
description: Learn how to customize icons for your Cordova application.
---
+{% cdv_platform inject %}
+
# Customize 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].
@@ -41,7 +43,7 @@ src | *Required* <br/> Location of the image file,
relative to your pr
platform | *Optional* <br/> Target platform
width | *Optional* <br/> Icon width in pixels
height | *Optional* <br/> Icon height in pixels
-target | *Optional* <br/> ==Electron== <br/> Set target to supply
unique icons for `application` and `installer`
+target | *Optional* <br/> {% cdv_platform electron %} <br/> Set target
to supply unique icons for `application` and `installer`
The following configuration can be used to define a single default icon
which will be used for all platforms.
diff --git a/www/docs/en/dev/config_ref/index.md
b/www/docs/en/dev/config_ref/index.md
index b340f4c8cd..7228bbc6ce 100644
--- a/www/docs/en/dev/config_ref/index.md
+++ b/www/docs/en/dev/config_ref/index.md
@@ -21,6 +21,8 @@ title: Config.xml
description: List of supported tags in the config.xml file.
---
+{% cdv_platform inject %}
+
# Config.xml
`config.xml` is a global configuration file that controls many aspects
@@ -61,12 +63,12 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
---------------- | ------------
id(string) | *Required* <br/> 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(string) | *Required* <br/> Full version number expressed in
major/minor/patch notation.
-android-versionCode(string) <br/> ==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(string) <br/> ==iOS== | Alternative version for iOS. For
further details, see [iOS
versioning](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364).
-android-packageName(string) <br/> ==Android== | Alternative package name for
Android, overrides `id`.
-ios-CFBundleIdentifier(string) <br/> ==iOS== | Alternative bundle id for iOS.
Overrides `id`.
-defaultlocale <br /> ==iOS== | Specified the default language of the app, as
an IANA language code.
-android-activityName(string) <br/> ==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.
+android-versionCode(string) <br/> {% 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(string) <br/> {% cdv_platform ios %} | Alternative version
for iOS. For further details, see [iOS
versioning](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364).
+android-packageName(string) <br/> {% cdv_platform android %} | Alternative
package name for Android, overrides `id`.
+ios-CFBundleIdentifier(string) <br/> {% cdv_platform ios %} | Alternative
bundle id for iOS. Overrides `id`.
+defaultlocale <br /> {% cdv_platform ios %} | Specified the default language
of the app, as an IANA language code.
+android-activityName(string) <br/> {% 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(string) | *Required* <br/> Namespace for the config.xml document.
xmlns:cdv(string) | *Required* <br/> Namespace prefix.
@@ -273,55 +275,55 @@ and will be indicated as such.
Attributes(type) <br/> <span class="sub-header">Only for platform:</span> |
Description
----------------- | ------------
-AllowInlineMediaPlayback(boolean) <br/> ==iOS== | *Default: false* <br/> 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 ```<video>``` elements.
*NOTE*: Prior to iOS 10, ```<video>``` elements need to use the
```webkit-playsinline``` attribute name instead.
-AllowNewWindows(boolean) <br/> ==iOS== | *Default: false* <br/> Set to true to
allow JavaScript `window.open` and HTML `target="_blank"` links to open a new
view overlaying the web view.
-AndroidLaunchMode(string) <br/> ==Android== | *Default: singleTop* <br/>
Allowed values: standard, singleTop, singleTask, singleInstance <br/> Sets the
Activity android:launchMode attribute. This changes what happens when the app
is launched from app icon or intent and is already running.
-AndroidInsecureFileModeEnabled(boolean) <br/> ==Android== | *Default: false*
<br/> If set to `true` loading `file:///` URLs is allowed. __Note__: Enabling
this setting allows malicious scripts loaded in a `file:///` context to launch
cross-site scripting attacks, either accessing arbitrary local files including
WebView cookies, app private data or even credentials used on arbitrary web
sites.
-android-maxSdkVersion(integer) <br/> ==Android== | *Default: Not Specified*
<br/> Sets the `maxSdkVersion` attribute of the `<uses-sdk>` tag in the
project's `AndroidManifest.xml` (see [here][uses-sdk]).
-android-minSdkVersion(integer) <br/> ==Android== | *Default: Dependent on
cordova-android Version* <br/> Sets the `minSdkVersion` attribute of the
`<uses-sdk>` tag in the project's `AndroidManifest.xml` (see [here][uses-sdk]).
-android-targetSdkVersion(integer) <br/> ==Android== | *Default: Dependent on
cordova-android Version* <br/> Sets the `targetSdkVersion` attribute of the
`<uses-sdk>` tag in the project's `AndroidManifest.xml` (see [here][uses-sdk]).
-AppendUserAgent(string) <br/> ==Android== ==iOS== | If set, the value will
append to the end of old UserAgent of webview. When using with
OverrideUserAgent, this value will be ignored.
-BackgroundColor(string) <br/> ==Android== ==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.
<br/>__Note__: `transparent` value will set the application tile background to
the accent color on Windows.
-BackupWebStorage(string) <br/> ==iOS== | *Default: cloud* <br/> Allowed
values: none, local, cloud. <br/> Set to cloud to allow web storage data to
backup via iCloud. Set to local to allow only local backups via iTunes sync.
Set to none prevent web storage backups.
-CordovaWebViewEngine(string) <br/> ==iOS== | *Default: CDVWebViewEngine* <br/>
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.
-DefaultVolumeStream(string) <br/> ==Android== | *Default: default* <br/>
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(boolean) <br/> ==iOS== ==Android== | *Default: false* <br/>
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. <br/>
-EnableViewportScale(boolean) <br/> ==iOS== | *Default: false* <br/> 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: <br/> ```<meta name='viewport' content='width=device-width,
initial-scale=1, user-scalable=no' />```
-ErrorUrl(URL) <br/> ==Android== | *Default: null* <br/> If set, will display
the referenced page upon an error in the application instead of a dialog with
the title "Application Error".
-ErrorUrl(string) <br/> ==iOS== | If set, will display the referenced local
page upon an error in the application.
-FullScreen(boolean) <br/> ==Android== | *Default: false* <br/> Allows you to
hide the status bar at the top of the screen. <br/> __Note__: Recommended
platform-agnostic way to achieve this is to use the [StatusBar
plugin][statusbar_plugin].
-GapBetweenPages(float) <br/> ==iOS== | *Default: 0* <br/> The size of the
gap, in points, between pages.
-GradlePluginGoogleServicesEnabled (boolean) <br/> ==Android== | *Default:
false* <br/> Set to true to enable the Google Services Gradle plugin.
-GradlePluginGoogleServicesEnabled (semver) <br/> ==Android== | *Default:
4.2.0* <br/> Set version of Google Services Gradle plugin to be used.
-GradlePluginKotlinEnabled (boolean) <br/> ==Android== | *Default: false* <br/>
Set to true to allow Kotlin files to be built.
-GradlePluginKotlinCodeStyle (string) <br/> ==Android== | *Default: official*
<br/> Allowed values: official, obsolete<br/> Sets how the Kotlin code is
formatting for readability.
-GradlePluginKotlinVersion (semver) <br/> ==Android== | *Default: 1.3.50* <br/>
Set the version of the Kotlin Gradle plugin to be used.
-InAppBrowserStorageEnabled (boolean) <br/> ==Android== | *Default: true* <br/>
Controls whether pages opened within an InAppBrowser can access the same
localStorage and WebSQL storage as pages opened with the default browser.
-InspectableWebview(boolean) <br/> ==Android== ==iOS== | *Default: depends on
Debug/Release build* <br/> On iOS 16.4 or later, enables or disables the
webview inspector. Defaults to `true` on debug builds and `false` on release
builds. This preference is ignored on iOS 16.3 and earlier; the inspector is
always enabled on debug builds and always disabled on release builds.
-KeepRunning(boolean) <br/> ==Android== | *Default: true* <br/> Determines
whether the application stays running in the background even after a
[pause](../cordova/events/events.html#pause) event fires. Setting this to false
does not kill the app after a [pause](../cordova/events/events.html#pause)
event, but simply halts execution of code within the cordova webview while the
app is in the background.
-KeyboardDisplayRequiresUserAction(boolean) <br/> ==iOS== | *Default: true*
<br/> Set to false to allow the keyboard to appear when calling focus() on
form inputs.
-LoadUrlTimeoutValue(number in milliseconds) <br/> ==Android== | *Default:
20000, 20 seconds* <br/> When loading a page, the amount of time to wait
before throwing a timeout error.
-LoadingDialog(string) <br/> ==Android== | *Default: null* <br/> If set,
displays a dialog with the specified title and message, and a spinner, when
loading the first page of an application. The title and message are separated
by a comma in this value string, and that comma is removed before the dialog is
displayed.
-LogLevel(string) <br/> ==Android== | *Default: DEBUG* <br/> Allowed values:
ERROR, WARN, INFO, DEBUG, VERBOSE <br/> Sets the minimum log level through
which log messages from your application will be filtered.
-MediaPlaybackAllowsAirPlay(boolean) <br/> ==iOS== | *Default: true* <br/> Set
to false to prevent Air Play from being used in this view. Available in default
UIWebView and WKWebView.
-MediaPlaybackRequiresUserAction(boolean) <br/> ==iOS== | *Default: false*
<br/> Set to true to prevent HTML5 videos or audios from playing automatically
with the autoplay attribute or via JavaScript.
+AllowInlineMediaPlayback(boolean) <br/> {% cdv_platform ios %} | *Default:
false* <br/> 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 ```<video>```
elements. *NOTE*: Prior to iOS 10, ```<video>``` elements need to use the
```webkit-playsinline``` attribute name instead.
+AllowNewWindows(boolean) <br/> {% cdv_platform ios %} | *Default: false* <br/>
Set to true to allow JavaScript `window.open` and HTML `target="_blank"` links
to open a new view overlaying the web view.
+AndroidLaunchMode(string) <br/> {% cdv_platform android %} | *Default:
singleTop* <br/> Allowed values: standard, singleTop, singleTask,
singleInstance <br/> Sets the Activity android:launchMode attribute. This
changes what happens when the app is launched from app icon or intent and is
already running.
+AndroidInsecureFileModeEnabled(boolean) <br/> {% cdv_platform android %} |
*Default: false* <br/> If set to `true` loading `file:///` URLs is allowed.
__Note__: Enabling this setting allows malicious scripts loaded in a `file:///`
context to launch cross-site scripting attacks, either accessing arbitrary
local files including WebView cookies, app private data or even credentials
used on arbitrary web sites.
+android-maxSdkVersion(integer) <br/> {% cdv_platform android %} | *Default:
Not Specified* <br/> Sets the `maxSdkVersion` attribute of the `<uses-sdk>`
tag in the project's `AndroidManifest.xml` (see [here][uses-sdk]).
+android-minSdkVersion(integer) <br/> {% cdv_platform android %} | *Default:
Dependent on cordova-android Version* <br/> Sets the `minSdkVersion` attribute
of the `<uses-sdk>` tag in the project's `AndroidManifest.xml` (see
[here][uses-sdk]).
+android-targetSdkVersion(integer) <br/> {% cdv_platform android %} | *Default:
Dependent on cordova-android Version* <br/> Sets the `targetSdkVersion`
attribute of the `<uses-sdk>` tag in the project's `AndroidManifest.xml` (see
[here][uses-sdk]).
+AppendUserAgent(string) <br/> {% 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.
+BackgroundColor(string) <br/> {% 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. <br/>__Note__: `transparent` value will set the
application tile background to the accent color on Windows.
+BackupWebStorage(string) <br/> {% cdv_platform ios %} | *Default: cloud* <br/>
Allowed values: none, local, cloud. <br/> Set to cloud to allow web storage
data to backup via iCloud. Set to local to allow only local backups via iTunes
sync. Set to none prevent web storage backups.
+CordovaWebViewEngine(string) <br/> {% cdv_platform ios %} | *Default:
CDVWebViewEngine* <br/> 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.
+DefaultVolumeStream(string) <br/> {% cdv_platform android %} | *Default:
default* <br/> 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(boolean) <br/> {% cdv_platform ios %} {% cdv_platform
android %} | *Default: false* <br/> 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. <br/>
+EnableViewportScale(boolean) <br/> {% cdv_platform ios %} | *Default: false*
<br/> 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: <br/> ```<meta name='viewport'
content='width=device-width, initial-scale=1, user-scalable=no' />```
+ErrorUrl(URL) <br/> {% cdv_platform android %} | *Default: null* <br/> If
set, will display the referenced page upon an error in the application instead
of a dialog with the title "Application Error".
+ErrorUrl(string) <br/> {% cdv_platform ios %} | If set, will display the
referenced local page upon an error in the application.
+FullScreen(boolean) <br/> {% cdv_platform android %} | *Default: false* <br/>
Allows you to hide the status bar at the top of the screen. <br/> __Note__:
Recommended platform-agnostic way to achieve this is to use the [StatusBar
plugin][statusbar_plugin].
+GapBetweenPages(float) <br/> {% cdv_platform ios %} | *Default: 0* <br/> The
size of the gap, in points, between pages.
+GradlePluginGoogleServicesEnabled (boolean) <br/> {% cdv_platform android %} |
*Default: false* <br/> Set to true to enable the Google Services Gradle plugin.
+GradlePluginGoogleServicesEnabled (semver) <br/> {% cdv_platform android %} |
*Default: 4.2.0* <br/> Set version of Google Services Gradle plugin to be used.
+GradlePluginKotlinEnabled (boolean) <br/> {% cdv_platform android %} |
*Default: false* <br/> Set to true to allow Kotlin files to be built.
+GradlePluginKotlinCodeStyle (string) <br/> {% cdv_platform android %} |
*Default: official* <br/> Allowed values: official, obsolete<br/> Sets how the
Kotlin code is formatting for readability.
+GradlePluginKotlinVersion (semver) <br/> {% cdv_platform android %} |
*Default: 1.3.50* <br/> Set the version of the Kotlin Gradle plugin to be used.
+InAppBrowserStorageEnabled (boolean) <br/> {% cdv_platform android %} |
*Default: true* <br/> Controls whether pages opened within an InAppBrowser can
access the same localStorage and WebSQL storage as pages opened with the
default browser.
+InspectableWebview(boolean) <br/> {% cdv_platform android %} {% cdv_platform
ios %} | *Default: depends on Debug/Release build* <br/> On iOS 16.4 or later,
enables or disables the webview inspector. Defaults to `true` on debug builds
and `false` on release builds. This preference is ignored on iOS 16.3 and
earlier; the inspector is always enabled on debug builds and always disabled on
release builds.
+KeepRunning(boolean) <br/> {% cdv_platform android %} | *Default: true* <br/>
Determines whether the application stays running in the background even after a
[pause](../cordova/events/events.html#pause) event fires. Setting this to false
does not kill the app after a [pause](../cordova/events/events.html#pause)
event, but simply halts execution of code within the cordova webview while the
app is in the background.
+KeyboardDisplayRequiresUserAction(boolean) <br/> {% cdv_platform ios %} |
*Default: true* <br/> Set to false to allow the keyboard to appear when
calling focus() on form inputs.
+LoadUrlTimeoutValue(number in milliseconds) <br/> {% cdv_platform android %} |
*Default: 20000, 20 seconds* <br/> When loading a page, the amount of time to
wait before throwing a timeout error.
+LoadingDialog(string) <br/> {% cdv_platform android %} | *Default: null* <br/>
If set, displays a dialog with the specified title and message, and a spinner,
when loading the first page of an application. The title and message are
separated by a comma in this value string, and that comma is removed before the
dialog is displayed.
+LogLevel(string) <br/> {% cdv_platform android %} | *Default: DEBUG* <br/>
Allowed values: ERROR, WARN, INFO, DEBUG, VERBOSE <br/> Sets the minimum log
level through which log messages from your application will be filtered.
+MediaPlaybackAllowsAirPlay(boolean) <br/> {% cdv_platform ios %} | *Default:
true* <br/> Set to false to prevent Air Play from being used in this view.
Available in default UIWebView and WKWebView.
+MediaPlaybackRequiresUserAction(boolean) <br/> {% cdv_platform ios %} |
*Default: false* <br/> Set to true to prevent HTML5 videos or audios from
playing automatically with the autoplay attribute or via JavaScript.
Orientation(string) | *Default: default* <br/> Allowed values: default,
landscape, portrait <br/> Allows you to lock orientation and prevent the
interface from rotating in response to changes in orientation. <br/> **NOTE:**
The default value means Cordova will strip the orientation preference entry
from the platform's manifest/configuration file allowing the platform to
fallback to its default behavior. For iOS, to specify both portrait & landscape
mode you would use the platform specifi [...]
-OverrideUserAgent(string) <br/> ==Android== ==iOS== | If set, the value will
replace the old UserAgent of webview. It is helpful to identify the request
from app/browser when requesting remote pages. Use with caution, this may cause
compatibility issues with web servers. For most cases, use AppendUserAgent
instead.
-PageLength(float) <br/> ==iOS== | *Default: 0* <br/> The size of each page,
in points, in the direction that the pages flow. When PaginationMode is right
to left or left to right, this property represents the width of each page. When
PaginationMode is topToBottom or bottomToTop, this property represents the
height of each page. The default value is 0, which means the layout uses the
size of the viewport to determine the dimensions of the page.
-PaginationBreakingMode(string) <br/> ==iOS== | *Default: page* <br/> Allowed
values: page, column <br/> Valid values are page and column.The manner in
which column- or page-breaking occurs. This property determines whether certain
CSS properties regarding column- and page-breaking are honored or ignored. When
this property is set to column, the content respects the CSS properties related
to column-breaking in place of page-breaking.
-PaginationMode(string) <br/> ==iOS== | *Default: unpaginated* <br/> Allowed
values: unpaginated, leftToRight, topToBottom, bottomToTop, rightToLeft <br/>
This property determines whether content in the web view is broken up into
pages that fill the view one screen at a time,or shown as one long scrolling
view. If set to a paginated form, this property toggles a paginated layout on
the content, causing the web view to use the values of PageLength and
GapBetweenPages to relayout its content.
-PreferredContentMode(string) <br/> ==iOS== | *Default: auto* <br/> Sets the
content mode (user agent) for the WebView and InAppBrowsers WebView on iPads.
Valid values are: `mobile` and `desktop`.
-InAppBrowserStatusBarStyle(string) <br/> ==iOS== | *Default: default* <br/>
Set text color style of the StatusBar for InAppBrowser for iOS. Valid values
are: `lightcontent` and `default`.
-SetFullscreen(boolean) <br/> ==Android== | *Default: false* <br/> Same as the
Fullscreen parameter in the global configuration of this xml file. This
Android-specific element is deprecated in favor of the global Fullscreen
element, and will be removed in a future version.
-ShowTitle(boolean) <br/> ==Android== | *Default: false* <br/> Show the title
at the top of the screen.
-Suppresses3DTouchGesture(boolean) <br/> ==iOS== | *Default: false* <br/> Set
to true to avoid 3D Touch capable iOS devices rendering a magnifying glass
widget when the user applies force while longpressing the webview. Test your
app thoroughly since this disables onclick handlers, but plays nice with
ontouchend. If this setting is true, SuppressesLongPressGesture will
effectively be true as well.
-SuppressesIncrementalRendering(boolean) <br/> ==iOS== | *Default: false* <br/>
Set to true to wait until all content has been received before it renders to
the screen.
-SuppressesLongPressGesture(boolean) <br/> ==iOS== | *Default: false* <br/>
Set to true to avoid iOS9+ rendering a magnifying glass widget when the user
longpresses the webview. Test your app thoroughly since this may interfere with
text selection capabilities.
-SwiftVersion(string) <br/> ==iOS== | *Default: (empty)* <br /> Set to specify
the Swift Version.
-TopActivityIndicator(string) <br/> ==iOS== | *Default: gray* <br/> Allowed
values: whiteLarge, white, gray. <br/> <br/> Controls the appearance of the
small spinning icon in the status bar that indicates significant processor
activity.
-UIWebViewDecelerationSpeed(string) <br/> ==iOS== | *Default: normal* <br/>
Allowed values: normal, fast <br/> This property controls the deceleration
speed of momentum scrolling. normal is the default speed for most native apps,
and fast is the default for Mobile Safari.
-deployment-target(string) <br/> ==iOS== | This sets the
IPHONEOS_DEPLOYMENT_TARGET in the build, which ultimately translates to the
MinimumOSVersion in the ipa. For more details please refer to Apple's
documentation on Deployment Target Settings
-target-device(string) <br/> ==iOS== | *Default: universal* <br/> Allowed
values: handset, tablet, universal <br/> This property maps directly to
TARGETED_DEVICE_FAMILY in the xcode project. Note that if you target universal
(which is the default) you will need to supply screen shots for both iPhone and
iPad or your app may be rejected.
+OverrideUserAgent(string) <br/> {% cdv_platform android %} {% cdv_platform ios
%} | If set, the value will replace the old UserAgent of webview. It is helpful
to identify the request from app/browser when requesting remote pages. Use with
caution, this may cause compatibility issues with web servers. For most cases,
use AppendUserAgent instead.
+PageLength(float) <br/> {% cdv_platform ios %} | *Default: 0* <br/> The size
of each page, in points, in the direction that the pages flow. When
PaginationMode is right to left or left to right, this property represents the
width of each page. When PaginationMode is topToBottom or bottomToTop, this
property represents the height of each page. The default value is 0, which
means the layout uses the size of the viewport to determine the dimensions of
the page.
+PaginationBreakingMode(string) <br/> {% cdv_platform ios %} | *Default: page*
<br/> Allowed values: page, column <br/> Valid values are page and column.The
manner in which column- or page-breaking occurs. This property determines
whether certain CSS properties regarding column- and page-breaking are honored
or ignored. When this property is set to column, the content respects the CSS
properties related to column-breaking in place of page-breaking.
+PaginationMode(string) <br/> {% cdv_platform ios %} | *Default: unpaginated*
<br/> Allowed values: unpaginated, leftToRight, topToBottom, bottomToTop,
rightToLeft <br/> This property determines whether content in the web view is
broken up into pages that fill the view one screen at a time,or shown as one
long scrolling view. If set to a paginated form, this property toggles a
paginated layout on the content, causing the web view to use the values of
PageLength and GapBetweenPages to rel [...]
+PreferredContentMode(string) <br/> {% cdv_platform ios %} | *Default: auto*
<br/> Sets the content mode (user agent) for the WebView and InAppBrowsers
WebView on iPads. Valid values are: `mobile` and `desktop`.
+InAppBrowserStatusBarStyle(string) <br/> {% cdv_platform ios %} | *Default:
default* <br/> Set text color style of the StatusBar for InAppBrowser for iOS.
Valid values are: `lightcontent` and `default`.
+SetFullscreen(boolean) <br/> {% cdv_platform android %} | *Default: false*
<br/> Same as the Fullscreen parameter in the global configuration of this xml
file. This Android-specific element is deprecated in favor of the global
Fullscreen element, and will be removed in a future version.
+ShowTitle(boolean) <br/> {% cdv_platform android %} | *Default: false* <br/>
Show the title at the top of the screen.
+Suppresses3DTouchGesture(boolean) <br/> {% cdv_platform ios %} | *Default:
false* <br/> Set to true to avoid 3D Touch capable iOS devices rendering a
magnifying glass widget when the user applies force while longpressing the
webview. Test your app thoroughly since this disables onclick handlers, but
plays nice with ontouchend. If this setting is true, SuppressesLongPressGesture
will effectively be true as well.
+SuppressesIncrementalRendering(boolean) <br/> {% cdv_platform ios %} |
*Default: false* <br/> Set to true to wait until all content has been received
before it renders to the screen.
+SuppressesLongPressGesture(boolean) <br/> {% cdv_platform ios %} | *Default:
false* <br/> Set to true to avoid iOS9+ rendering a magnifying glass widget
when the user longpresses the webview. Test your app thoroughly since this may
interfere with text selection capabilities.
+SwiftVersion(string) <br/> {% cdv_platform ios %} | *Default: (empty)* <br />
Set to specify the Swift Version.
+TopActivityIndicator(string) <br/> {% cdv_platform ios %} | *Default: gray*
<br/> Allowed values: whiteLarge, white, gray. <br/> <br/> Controls the
appearance of the small spinning icon in the status bar that indicates
significant processor activity.
+UIWebViewDecelerationSpeed(string) <br/> {% cdv_platform ios %} | *Default:
normal* <br/> Allowed values: normal, fast <br/> This property controls the
deceleration speed of momentum scrolling. normal is the default speed for most
native apps, and fast is the default for Mobile Safari.
+deployment-target(string) <br/> {% cdv_platform ios %} | This sets the
IPHONEOS_DEPLOYMENT_TARGET in the build, which ultimately translates to the
MinimumOSVersion in the ipa. For more details please refer to Apple's
documentation on Deployment Target Settings
+target-device(string) <br/> {% cdv_platform ios %} | *Default: universal*
<br/> Allowed values: handset, tablet, universal <br/> This property maps
directly to TARGETED_DEVICE_FAMILY in the xcode project. Note that if you
target universal (which is the default) you will need to supply screen shots
for both iPhone and iPad or your app may be rejected.
Examples:
@@ -390,8 +392,8 @@ Used to specify certain plugin parameters such as: what
package to retrieve the
Attributes(type) <br/> <span class="sub-header">Only for platform:</span> |
Description
----------------- | ------------
-name(string) <br/> ==iOS== ==Android== | *Required* <br/> Allowed values:
android-package, ios-package, onload. <br/> 'ios-package' and
'android-package' are used to specify the name of the package (as specified by
the 'value' attribute) to be used to initialize the plugin code, while 'onload'
is used to specify whether the corresponding plugin (as specified in the
'value' attribute) is to be instantiated when the controller is initialized.
-value(string or boolean) <br/> ==iOS== ==Android== | *Required* <br/>
Specifies the name of the package to be used to initialize the plugin code
(when the 'name' attribute is android-package or ios-package), specifies the
name of the plugin to be loaded during controller initialization (when 'name'
attribute is set to 'onload').
+name(string) <br/> {% cdv_platform ios %} {% cdv_platform android %} |
*Required* <br/> Allowed values: android-package, ios-package, onload. <br/>
'ios-package' and 'android-package' are used to specify the name of the package
(as specified by the 'value' attribute) to be used to initialize the plugin
code, while 'onload' is used to specify whether the corresponding plugin (as
specified in the 'value' attribute) is to be instantiated when the controller
is initialized.
+value(string or boolean) <br/> {% cdv_platform ios %} {% cdv_platform android
%} | *Required* <br/> Specifies the name of the package to be used to
initialize the plugin code (when the 'name' attribute is android-package or
ios-package), specifies the name of the plugin to be loaded during controller
initialization (when 'name' attribute is set to 'onload').
Examples:
@@ -448,7 +450,7 @@ This tag installs resource files into your platform, and is
similar to the same
Attributes(type) <br/> <span class="sub-header">Only for platform:</span> |
Description
---------------- | ------------
-src(string) <br/> ==iOS== ==Android==| *Required* <br/> Location of the file
relative to `config.xml`.
+src(string) <br/> {% cdv_platform ios %} {% cdv_platform android %}|
*Required* <br/> Location of the file relative to `config.xml`.
target(string) | Path to where the file will be copied in your directory.
Examples:
diff --git a/www/docs/en/dev/plugin_ref/spec.md
b/www/docs/en/dev/plugin_ref/spec.md
index cbfc0a855d..2898a50424 100644
--- a/www/docs/en/dev/plugin_ref/spec.md
+++ b/www/docs/en/dev/plugin_ref/spec.md
@@ -22,6 +22,8 @@ toc_title: Plugin.xml
description: List of supported tags in the plugin.xml file.
---
+{% cdv_platform inject %}
+
# Plugin.xml
Plugin.xml file defines the structure and settings required for your plugin.
It has several elements to provide details about your plugin.
@@ -262,8 +264,8 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
---------------- | ------------
src(string) | *Required* <br/> Location of the file relative to `plugin.xml`.
If the src file can't be found, the CLI stops and reverses the installation,
issues a notification about the problem, and exits with a non-zero code.
target-dir(string) | A directory into which the files should be copied,
relative to the root of the Cordova project. In practice, this is most
important for Java-based platforms, where a file in the `com.alunny.foo`
package must be located within the `com/alunny/foo` directory. For platforms
where the source directory is not important, this attribute should be omitted.
-framework(boolean) <br/> ==iOS== | *Default: false* <br/> If set to true,
also adds the specified file as a framework to the project.
-compiler-flags(string) <br/> ==iOS== | If set, assigns the specified compiler
flags for the particular source file.
+framework(boolean) <br/> {% cdv_platform ios %} | *Default: false* <br/> If
set to true, also adds the specified file as a framework to the project.
+compiler-flags(string) <br/> {% cdv_platform ios %} | If set, assigns the
specified compiler flags for the particular source file.
Examples:
```xml
@@ -283,7 +285,7 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
---------------- | ------------
src(string) | *Required* <br/> Location of the file relative to `plugin.xml`.
If the src file can't be found, the CLI stops and reverses the installation,
issues a notification about the problem, and exits with a non-zero code.
target-dir(string) | A directory into which the files should be copied,
relative to the root of the Cordova project.
-type(string) <br/> ==iOS== | If this value is `BridgingHeader`, the file is
imported in the `Bridging-Header.h` and can be called from swift program.
+type(string) <br/> {% cdv_platform ios %} | If this value is `BridgingHeader`,
the file is imported in the `Bridging-Header.h` and can be called from swift
program.
Example:
@@ -301,10 +303,10 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
---------------- | ------------
src(string) | *Required* <br/> Location of the file relative to `plugin.xml`.
If the src file can't be found, the CLI stops and reverses the installation,
issues a notification about the problem, and exits with a non-zero code.
target(string) | Path to where the file will be copied in your directory.
-arch(string) <br/> ==windows== | Allowed values: `x86`, `x64` or `ARM`. <br/>
Indicates that the file should only be included when building for the specified
architecture.
-device-target <br/> ==windows== | Allowed values: `win` (or `windows`),
`phone` or `all`. <br/> Indicates that the file should only be included when
building for the specified target device type.
-versions <br/> ==windows== | Indicates that the file should only be included
when building for versions that match the specified version string. Value can
be any valid node semantic version range string.
-reference <br/> ==windows== | Indicates that the file should be referenced
from the src rather than copied to the target destination. The file will appear
in Visual Studio with the file name specified by target, however will point to
the respective src, depending on the architecture.
+arch(string) <br/> {% cdv_platform windows %} | Allowed values: `x86`, `x64`
or `ARM`. <br/> Indicates that the file should only be included when building
for the specified architecture.
+device-target <br/> {% cdv_platform windows %} | Allowed values: `win` (or
`windows`), `phone` or `all`. <br/> Indicates that the file should only be
included when building for the specified target device type.
+versions <br/> {% cdv_platform windows %} | Indicates that the file should
only be included when building for versions that match the specified version
string. Value can be any valid node semantic version range string.
+reference <br/> {% cdv_platform windows %} | Indicates that the file should be
referenced from the src rather than copied to the target destination. The file
will appear in Visual Studio with the file name specified by target, however
will point to the respective src, depending on the architecture.
Examples:
@@ -334,8 +336,8 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
target(string) | The file to be modified, and the path relative to the root of
the Cordova project. If the specified file does not exist, the tool ignores the
configuration change and continues installation. <br/> The target can include
wildcard (`*`) elements. In this case, the CLI recursively searches through the
project directory structure and uses the first match. <br/> On iOS, the
location of configuration files relative to the project directory root is not
known, so specifying a ta [...]
parent(string) | An XPath selector referencing the parent of the elements to
be added to the config file. If you use absolute selectors, you can use a
wildcard (`*`) to specify the root element, e.g., `/*/plugins`. If the selector
does not resolve to a child of the specified document, the tool stops and
reverses the installation process, issues a warning, and exits with a non-zero
code. <br/> For `plist` files, the `parent` determines under what parent key
the specified XML should be inserted.
after(string) | A prioritized list of accepted siblings after which to add the
XML snippet. Useful for specifying changes in files which require strict
ordering of XML elements like
[this](https://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769509%28v=vs.105%29.aspx#BKMK_EXTENSIONSelement).
-device-target(string) <br/> ==windows== | Allowed values: `win`, `phone`,
`all`. <br/> Applicable when affecting the meta-name `package.appxmanifest`,
this attribute indicates that the file should only be modified when building
for the specified target device type.
-versions(string) <br/> ==windows== | Applicable when affecting the meta-name
`package.appxmanifest`, this attribute indicates that app manifests for
specific Windows versions should only be altered for versions that match the
specified version string. Value can be any valid node semantic version range
string.
+device-target(string) <br/> {% cdv_platform windows %} | Allowed values:
`win`, `phone`, `all`. <br/> Applicable when affecting the meta-name
`package.appxmanifest`, this attribute indicates that the file should only be
modified when building for the specified target device type.
+versions(string) <br/> {% cdv_platform windows %} | Applicable when affecting
the meta-name `package.appxmanifest`, this attribute indicates that app
manifests for specific Windows versions should only be altered for versions
that match the specified version string. Value can be any valid node semantic
version range string.
Examples:
@@ -496,8 +498,8 @@ Attributes(type) <br/> <span class="sub-header">Only for
platform:</span> | Desc
---------------- | ------------
src(string) | *Required* <br/> The location of the file relative to
`plugin.xml`. If `src` can't be found, the CLI stops and reverses the
installation, issues a warning about the problem, and exits with a non-zero
code. <br/> For Windows, it indicates the name of the SDK to include (which
will be used as value of the `Include` attribute of the generated
`<SDKReference>` element).
arch(string) | The architecture for which the `.so` file has been built,
either `device` or `simulator`. <br/> For Windows, it indicates that the
`<SDKReference>` should only be included when building for the specified
architecture. Supported values are `x86`, `x64` or `ARM`.
-device-target(string) <br/> ==windows== | Allowed values: `win` (or
`windows`), `phone` or `all`. <br/> Indicates that the `<SDKReference>` should
only be included when building for the specified target device type.
-versions(string) <br/> ==windows== | Indicates that the `<SDKReference>`
should only be included when building for versions that match the specified
version string. Value can be any valid node semantic version range string.
+device-target(string) <br/> {% cdv_platform windows %} | Allowed values: `win`
(or `windows`), `phone` or `all`. <br/> Indicates that the `<SDKReference>`
should only be included when building for the specified target device type.
+versions(string) <br/> {% cdv_platform windows %} | Indicates that the
`<SDKReference>` should only be included when building for versions that match
the specified version string. Value can be any valid node semantic version
range string.
For Android, the `<lib-file>` element is used for installing **.jar** files in
the project's **libs directory**. It supports only the `src` attribute which
contains the relative path to the .jar file.
@@ -526,14 +528,14 @@ custom(boolean) | Indicates whether the framework is
included as part of your pl
weak(boolean) | *Default: false* <br/> Indicates whether the framework should
be weakly linked.
type(string) | Indicates the type of framework to add.
parent(string) | *Default: .* <br/> Sets the relative path to the directory
containing the sub-project to which to add the reference. The default, `.`,
implies the application project.
-arch(string) <br/> ==windows== | Allowed values: `x86`, `x64` or `ARM`. <br/>
Indicates that the framework should only be included when building for the
specified architecture.
-device-target(string) <br/> ==windows== | Allowed values: `win` (or
`windows`), `phone` or `all`. <br/> Indicates that the framework should only
be included when building for the specified target device type.
-versions(string) <br/> ==windows== | Indicates that the framework should only
be included when building for versions that match the specified version string.
Value can be any valid node semantic version range string.
-target-dir(string) <br/> ==windows== | Indicates a subdirectory into which the
framework should be copied. In practice, this is most important when plugin
contains different framework versions for different chip architectures or
device targets, but which have the same name. This allows you to specify
different subfolders for each framework version so that they don't overlap each
other.
-implementation(string) <br/> ==windows== | Sets the relative path to `.dll`
file that contains implementation for WinMD component, written in C++.
-spec(string) <br/> ==ios== | Paired with `type="podspec"`, this is the spec
string for the CocoaPod you want to install (static library only). CocoaPod
support only exists in `cordova-ios 4.3.0` and `cordova-cli 6.4.0`. For your
plugin, make sure you add the appropriate `<engine>` tags and `package.json`
[dependencies](../guide/hybrid/plugins/index.html#specifying-cordova-dependencies)
to ensure backwards-compatible support.
-embed(boolean) <br/> ==ios== | *Default: false* <br/>Paired with
`custom="true"`, this is set to true if you want to embed your custom framework
into your app bundle, so it can be dynamically loaded at runtime (dynamic
framework). This puts your custom framework in the 'Embedded Binaries' section
of your Xcode Project Settings. Only supported with the combination of
`[email protected]` and `[email protected]`
-link(boolean) <br/> ==ios== | *Default: !embed* <br/> Set this to true if you
want to link the framework. This puts the framework in the 'Link Binaries with
Libraries' section of your Xcode Project Settings.
+arch(string) <br/> {% cdv_platform windows %} | Allowed values: `x86`, `x64`
or `ARM`. <br/> Indicates that the framework should only be included when
building for the specified architecture.
+device-target(string) <br/> {% cdv_platform windows %} | Allowed values: `win`
(or `windows`), `phone` or `all`. <br/> Indicates that the framework should
only be included when building for the specified target device type.
+versions(string) <br/> {% cdv_platform windows %} | Indicates that the
framework should only be included when building for versions that match the
specified version string. Value can be any valid node semantic version range
string.
+target-dir(string) <br/> {% cdv_platform windows %} | Indicates a subdirectory
into which the framework should be copied. In practice, this is most important
when plugin contains different framework versions for different chip
architectures or device targets, but which have the same name. This allows you
to specify different subfolders for each framework version so that they don't
overlap each other.
+implementation(string) <br/> {% cdv_platform windows %} | Sets the relative
path to `.dll` file that contains implementation for WinMD component, written
in C++.
+spec(string) <br/> {% cdv_platform ios %} | Paired with `type="podspec"`, this
is the spec string for the CocoaPod you want to install (static library only).
CocoaPod support only exists in `cordova-ios 4.3.0` and `cordova-cli 6.4.0`.
For your plugin, make sure you add the appropriate `<engine>` tags and
`package.json`
[dependencies](../guide/hybrid/plugins/index.html#specifying-cordova-dependencies)
to ensure backwards-compatible support.
+embed(boolean) <br/> {% cdv_platform ios %} | *Default: false* <br/>Paired
with `custom="true"`, this is set to true if you want to embed your custom
framework into your app bundle, so it can be dynamically loaded at runtime
(dynamic framework). This puts your custom framework in the 'Embedded Binaries'
section of your Xcode Project Settings. Only supported with the combination of
`[email protected]` and `[email protected]`
+link(boolean) <br/> {% cdv_platform ios %} | *Default: !embed* <br/> Set this
to true if you want to link the framework. This puts the framework in the 'Link
Binaries with Libraries' section of your Xcode Project Settings.
Examples:
@@ -585,7 +587,7 @@ Another example of using Windows-specific attributes to add
a reference to WinMD
target-dir="component\x86" arch="x86" versions=">=10.0" />
```
-## podspec (==iOS==)
+## podspec ({% cdv_platform ios %})
Identifies the CocoaPods `Podfile` that provides the dependencies in which the
plugin depends on.
This element contains a `<config>` and a `<pods>` tag.
diff --git a/www/plugins/index.html b/www/plugins/index.html
index e056f5e0aa..6fdd5d9325 100644
--- a/www/plugins/index.html
+++ b/www/plugins/index.html
@@ -29,8 +29,7 @@ description: Search here for Apache Cordova plugins published
on NPM.
</ul>
</div>
-<!-- This is our "sprite sheet" of icons, embedded in the page -->
-<svg xmlns="http://www.w3.org/2000/svg" hidden style="display: none
!important"><symbol id="browser" viewBox="461.6 9.3 30 30"><path d="M476.7
10.3c-7.7 0-14 6.3-14 14s6.3 14 14 14 14-6.3 14-14-6.3-14-14-14m9.8
9h-5.1c-.3-2.1-.8-4-1.4-5.5 2.8.9 5.1 2.9 6.5 5.5m-6.8 5-.1 3h-5.8l-.1-3
.1-3h5.8l.1 3m-3 11h-.9c-.6-1.1-1.4-3.1-1.8-6h5.3c-.4 2.9-1.1 4.8-1.8
6h-.8m-2.7-16c.4-2.9 1.1-4.8 1.8-6h1.8c.6 1.1 1.4 3.1 1.8 6H474zm-.6-5.5c-.6
1.5-1.1 3.4-1.4 5.5h-5.1c1.3-2.6 3.6-4.6 6.5-5.5m-7.3 7.5h5.7 [...]
+{% cdv_platform inject %}
<div class="plugins">
{% for plugin in site.data.plugins %}
diff --git a/www/static/css-src/main.scss b/www/static/css-src/main.scss
index 939f5fb93f..f718d0e70f 100644
--- a/www/static/css-src/main.scss
+++ b/www/static/css-src/main.scss
@@ -221,6 +221,19 @@ code {
border-radius: 4px !important;
}
+.platform-icon {
+ width: 22px;
+ height: 22px;
+}
+
+.platform-icon.android {
+ width: 18px;
+}
+
+.platform-icon.electron {
+ width: 21px;
+}
+
@import 'home';
@import 'blog';
@import 'plugins';
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]