我在ios10之前创建了一个项目,它运行正常。 自从ios10发布以来,我的应用程序出现问题,仅在ios上出现问题。 我的项目是在离子+ cordova上,我在http://application.t-d.com/api.php这样的网站上进行查询,然后检索一个json对象。 但是,从ios10开始,我有这样的错误消息:
拒绝加载gap :: // ready,因为它既不出现在child-src指令中,也出现在内容安全策略的default-src指令中。
所以,我修改了我的config.xml和index.html,就像google searsh上的指示一样,但都没有。
实际上在我的config.xml中
<content src="index.html"/>
<access origin='https://cordova.apache.org ' minimum-tls-version='TLSv1.1' requires-forward-secrecy='false' requires-certificate-transparency='true' />
<access origin='*' allows-arbitrary-loads-in-media='true' allows- arbitrary-loads-in-web-content='true' allows-local-networking='true' />
<allow-navigation href="*"/>
<allow-navigation href="http://*/*"/>
<allow-navigation href="https://*/*"/>
<allow-navigation href="data:*"/>
并在我的index.html中:
<meta http-equiv="Content-Security-Policy" content="default-src gap://ready file://* *; script-src 'self' 'unsafe-inline''unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
你有什么建议吗?