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>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>