In the IOS app I built using phonegap, I have an Iframe load external site. This works fine in android . In IOS the Iframe does not load the external site. Is there a workaround for this?
- 24 Posts
- 0 Reply Likes
Posted 5 years ago
- 24 Posts
- 0 Reply Likes
I got the latest plugin for whitelist. In my config.xml file I have
I also added the metatag in my index.html file
<plugin name="cordova-plugin-whitelist"/>
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-navigation href="*" />
<allow-intent href="*" />
I also added the metatag in my index.html file
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
You don't have the plugin, because that line contains two errors:
- you used a PLUGIN element, which is unknown to PGB
- you failed to set the source attribute to 'npm'
- you used a PLUGIN element, which is unknown to PGB
- you failed to set the source attribute to 'npm'
- 24 Posts
- 0 Reply Likes
Thanks Petra, I added
and still the iframe does not load external site.
What am I missing?
<gap:plugin name="cordova-plugin-whitelist" source="npm"/>
and still the iframe does not load external site.
What am I missing?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Not sure.
I would first remove that CSP meta tag and retry, to find out if that causes the problem.
I would first remove that CSP meta tag and retry, to find out if that causes the problem.
- 8261 Posts
- 263 Reply Likes
Here is a complete guide on hot to add plugins to a project:
http://docs.build.phonegap.com/en_US/configuring_plugins.md.html#Plugins
http://docs.build.phonegap.com/en_US/configuring_plugins.md.html#Plugins
- 24 Posts
- 0 Reply Likes
Amir, Thanks for replying. As suggested in the document i added the plugin in my
config.xml as
and in my index.html i have the meta tag
This still did not load the external site to the iframe in IOS.
config.xml as
<gap:plugin name="cordova-plugin-whitelist" source="npm"/>
and in my index.html i have the meta tag
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://msn.com">
This still did not load the external site to the iframe in IOS.
- 13 Posts
- 2 Reply Likes
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers
-
Programming (Others)
- 1167 Conversations
- 23 Followers


