Allow external hosts in iframe on xcode 4.1 using

2020-03-08 07:21发布

I'm trying to create an iPad/iPhone-app that displays an iFrame that links to an external site. (It's doesn't have to be in the App Store).

The problem is that when I load the app, it's takes me to Safari.

I know there was a setting in an earlier version of XCode, where you could specify which external hosts was allowed in the app. And that worked!

I can't seem to find the setting in 4.1...

Anybody know where I can locate it?

Cheers!

标签: xcode cordova
2条回答
劳资没心,怎么记你
2楼-- · 2020-03-08 08:09

Phonegap reads a setting called 'ExternalHosts' - this one is used to whitelist allowed external domains.

Open phonegap.plist - the key should be there, if not, simply add it.

查看更多
Anthone
3楼-- · 2020-03-08 08:20

Changes to PhoneGap.plist or Cordova.plist

Change/add the following values in PhoneGap.plist or Cordova.plist file of your app.

MediaPlaybackRequiresUserAction: NO

AllowInlineMediaPlayback: YES

OpenAllWhitelistURLsInWebView: YES

and set ExternalHosts list as you require

here i do for showing gopoglemap in app

ExternalHosts

      *.google.com
      *.gstatic.com
查看更多
登录 后发表回答