[英]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: 我的问题是:
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.