问题:在ios下边使用iframe出现白屏问题
android下边正常
原因是ios对app打开外部网页有限制需要取消限制
解决方法
1. 确认添加whitelist 插件
2.在config.xml中添加
<plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" /> <allow-navigation href="*" /> <allow-intent href="*" /> <access origin="*" />
3.在index.html中添加如下代码
<meta http-equiv="Content-Security-Policy"
content="default-src *;
style-src * 'self' 'unsafe-inline' 'unsafe-eval';
script-src * 'self' 'unsafe-inline' 'unsafe-eval';">