iframe not loading after upgrade to Cordova iOS 4.1.1

393 views
Skip to first unread message

George Christou

unread,
May 6, 2016, 4:09:05 AM5/6/16
to phonegap

We recently updated to Cordova iOS 4.1.1. After the upgrade iframes stopped working for us (just shows a blank screen, it never loads). We suspected it might have been a security issue.


I followed the guide here without any luck:https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/index.html


I ended up whitelisting/allowing everything without luck


This is what I have in config.xml:

<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" />


This is what I have in index.html:

<meta http-equiv="Content-Security-Policy" 
content="default-src * 'unsafe-inline' 'unsafe-eval'; 
         frame-src * 'self' 'unsafe-inline' 'unsafe-eval';
         style-src * 'self' 'unsafe-inline' 'unsafe-eval';
         script-src * 'self' 'unsafe-inline' 'unsafe-eval';">


And this is the iframe (loaded dynamically):

<iframe title="title" frameborder="0" src="http://www.google.com/" style="width: 100%; height: 100%;"></iframe>

George Christou

unread,
May 6, 2016, 4:50:52 AM5/6/16
to phonegap

Figured it out. Turns out I had to add the navigation filter plugin to config.xml as well:

<feature name="IntentAndNavigationFilter">
    <param name="ios-package" value="CDVIntentAndNavigationFilter"/>
    <param name="onload" value="true"/>
</feature>

Kerri Shotts

unread,
May 8, 2016, 10:18:57 PM5/8/16
to phonegap
You shouldn't have to do that, though. You might want to file an issue with the dev team at issues.cordova.io.
Reply all
Reply to author
Forward
0 new messages