首页 > 解决方案 > 在 Cordova InAppBrowser-Plugin 中调用“https://localhost”不起作用

问题描述

我目前正在使用 Apache Cordova 构建一个跨平台的移动应用程序。我正在使用 Apache 托管另一个网络应用程序。通过 访问网络应用程序https://localhost。我正在使用cordova-inappbrowser-plugin 在我的应用程序中打开网络网址。

我目前的问题:我似乎无法弄清楚,如何打开https://localhost. Cordova-plugin 适用于“普通”网址,例如https://youtube.comor else,但是当我尝试打开https://localhost或者localhost它只显示没有我的网络应用内容的空白页面时。

在我的应用程序中打开 url 的代码如下所示:

let ref = cordova.InAppBrowser.open('https://localhost', '_blank', 'hideurlbar=yes,hidenavigationbuttons=yes')

https://localhost从我的 iOS 模拟器上预装的 Safari 应用程序调用工作正常。

有谁知道我做错了什么?非常感谢您的帮助。

标签: ioscordovalocalhostcordova-pluginsinappbrowser

解决方案


推荐阅读