iframe not loading after upgrade to Cordova iOS 4.1.1

Showing 1-3 of 3 messages
iframe not loading after upgrade to Cordova iOS 4.1.1 George Christou 5/6/16 1:09 AM

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>
Re: iframe not loading after upgrade to Cordova iOS 4.1.1 George Christou 5/6/16 1:50 AM

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>
Re: iframe not loading after upgrade to Cordova iOS 4.1.1 Kerri Shotts 5/8/16 7:18 PM
You shouldn't have to do that, though. You might want to file an issue with the dev team at issues.cordova.io.