简体   繁体   English

使用cordova-plugin-whitelist

[英]Use of cordova-plugin-whitelist

In my cordova hello world project, When I run: 在我的cordova hello world项目中,当我运行时:

cordova platforms add android

it automatically adds cordova-plugin-whitelist plugin. 它会自动添加cordova-plugin-whitelist插件。

From plugin docs it is only for android platform. 插件文档来看,它仅适用于android平台。

Supported Cordova Platforms 支持的Cordova平台

  • Android 4.0.0 or above Android 4.0.0或以上

My questions are: 我的问题是:

  • What is the use of this plugin? 这个插件有什么用?
  • Why only android? 为什么只有Android? Why not other platforms? 为什么不使用其他平台?

As you have mentioned, this plugin is meant only for Android as the plugin source code itself supports only Android platform. 如您所述,此插件仅适用于Android,因为该插件的源代码本身仅支持Android平台。

This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0 and above. 此插件实现了白名单策略,用于在Cordova 4.0及更高版本上浏览应用程序Webview。 The use of this plugin is that it provides better security and configurability than earlier versions of Cordova. 此插件的使用是,它提供了比Cordova早期版本更好的安全性和可配置性。 Infact it is possible to create your own whitelist plugin but it is not recommended unless your app has very specific security policy needs. 实际上,可以创建自己的白名单插件,但除非您的应用程序有非常特定的安全策略需求,否则不建议使用。

Also what I noticed while creating a project in iOS is that it does include cordova whitelist plugin in the plugins folder as its automatically included in config.xml 同样,我在iOS中创建项目时注意到的是,它确实在plugins文件夹中包含cordova白名单插件,因为它自动包含在config.xml中。

But what I infer from the official documentation of iOS whitelisting is that for cordova-ios version 4.0 and above this plugin is not required but it's configuration details apply to iOS too. 但是我从iOS白名单的官方文档推断出,对于cordova-ios版本4.0及更高版本,不需要此插件,但其配置详细信息也适用于iOS。

You can check out this official cordova link for more detailed info on whitelisting and its application on various platforms. 您可以查看此官方cordova链接,以获取有关白名单及其在各种平台上的应用的更多详细信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 build.phonegap插件不受支持:cordova-plugin-whitelist @ 1 - build.phonegap plugin unsupported: cordova-plugin-whitelist @ 1 cordova-plugin-whitelist适用于Android,但不适用于iOS(Phonegap Build) - cordova-plugin-whitelist working on Android but not iOS (Phonegap Build) 使用 Phonegap 构建时cordova-plugin-whitelist 不起作用 - cordova-plugin-whitelist not working when using Phonegap build cordova插件rm cordova-plugin-whitelist不会更改config.xml,因此它会在构建时重新读取 - cordova plugin rm cordova-plugin-whitelist does not change config.xml so it will be readded upon build Cordova无法安装'cordova-plugin-whitelist':错误:ENOENT:没有这样的文件或目录AndroidManifest.xml - Cordova failed to install 'cordova-plugin-whitelist': Error: ENOENT: no such file or directory AndroidManifest.xml 无法安装'cordova-plugin-whitelist':错误:cmd:命令失败,退出代码为1 - Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1 继续获取:无法安装'cordova-plugin-whitelist':错误:cmd:命令失败,退出代码为1 - Keep getting: Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1 无法安装“ cordova-plugin-whitelist”:使用forcedroid命令行出错 - Failed to install 'cordova-plugin-whitelist': Error using forcedroid command line 即使已安装cordova-plugin-whitelist,$ http的ionic也无法在实际设备上运行 - $http get in ionic not working on real device even cordova-plugin-whitelist is installed 流星错误:找不到Content-Security-Policy元标记。 使用cordova-plugin-whitelist插件时,请添加一个 - Meteor error: No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM