且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在iOS上的Cordova应用中无法启动deviceready

更新时间:2023-01-25 22:02:28

如果您遇到的问题与我相同,那么这与您的内容安全策略元标记有关.我使用了以下此答案中的一个,问题就解决了.

If you're having the same problem I was, then this is related to your content-security-policy meta tag. I used the one below from this answer, and problem solved.

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data:* gap://* tel:* 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" />