【发布时间】:2012-10-08 06:57:18
【问题描述】:
我有一个 IOS 应用,它需要在应用内的 iframe 中加载一些外部 url。
我的代码看起来像
<body>
<iframe width="560" height="315" src="https://www.google.co.in/" frameborder="0" allowfullscreen></iframe>
<div class="footer"></div>
</body>
cordova plist:
OpenAllWhitelistURLsInWebView: YES
ExternalHosts: *
但每当我尝试加载页面时都会出错
“无法加载网页并出现错误:操作无法完成。(NSURLErrorDomain 错误 -999。)”
我无法加载外部网址
谁能帮我解决这个问题
【问题讨论】:
-
这在 PhoneGap-2.3.0 中对我来说很好用。在 iPhone 中测试
-
Google 不允许 x-frame,这意味着您无法将 google 加载到 iframe 中。