iOSでRefused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy. エラー

Cordovaで開発したアプリをiOS10で実行すると以下のエラー(iOS9までは正常に動いていた)

Refused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy.
HTMLを以下の通り修正
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
↓
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src * 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
default-srcに「gap://ready file:」を追加する必要があるようだ。

コメント

  1. […] iOSでRefused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy. エラー https://ufirst.jp/memo/2016/09/16/ios%E3%81%A7refused-to-load-gapready-because-it-appears- […]

タイトルとURLをコピーしました