2016-05-06 41 views
0

我们最近更新到Cordova iOS 4.1.1。升级iframes停止为我们工作后(只显示一个空白屏幕,它永远不会加载)。我们怀疑这可能是一个安全问题。升级到Cordova后iframe无法加载iOS 4.1.1

我跟着莅临指导,没有任何运气:https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/index.html

我结束了白名单/允许的一切,而不运气

这是我在config.xml中:

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

这是我在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';"> 

An d这是iframe(动态加载):

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

回答

0

找出来了。原来我不得不将导航过滤器插件添加到config.xml中:

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