Hi. I have a strange problem with using an iframe in my app. Some iOS users report that it renders blank while other confirm that it works just fine. I haven’t been able to reproduce the problem in the simulator though so it seems that only physical devices are affected by this. Unfortunately I don’t have a physical iOS device to test it on. There have not been any reports about this from android users.
By googling I found that it may be caused by CSP, so I set this in my index.html:
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' 'unsafe-hashes' 'unsafe-allow-redirects';">
Some sources also mentioned adding these lines to config.xml:
<access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-navigation href="*" />
And to include this in my Info.plist:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key><true /> </dict>
And the iframe is used like this:
<iframe class="izus" id="izus" ref="izusRef" :src="reactiveUrlRef">izus</iframe>
Did I miss something? I am really out of ideas.