phonegap iphone外部网址 [英] phonegap iphone external url

查看:105
本文介绍了phonegap iphone外部网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用phonegap创建应用程序。我有一个问题,当我试图包括远程URL作为网页。我有这工作在Android上,这是失败很容易通过改变 super.loadUrl(); 。一段时间后,我发现我可以更改 startPage (适用于iOS)。现在我可以在iOS应用程序中包含远程网页,但phonegap似乎没有加载。

I'm using phonegap to create an app. I'm having a problem when I'm trying to 'include' a remote url as webpage. I have this working on Android, this was faily easy by changing the super.loadUrl();. After a while I found out that I could change the startPage (for iOS). Now I can include the remote webpage in an iOS app but phonegap doesn't seem to be loading.

没有任何事件(如 deviceready )将被调用,我不能使用phonegap api。

No events (like the deviceready) will be called and I can't use the phonegap api.

有任何帮助吗?

推荐答案

为了能够在外部网站上运行PhoneGap代码,您需要将网站列入白名单。每个平台都有不同的白名单方式。对于iOS,您需要在PhoneGap.plist中的ExternalHosts键下添加主持人。

In order for you to be able to run PhoneGap code on an external website you will need to whitelist the website. Each platform has a different way of whitelisting. For iOS you will need to add the host in PhoneGap.plist under the "ExternalHosts" key.

这篇关于phonegap iphone外部网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆