marcel
marcel

Reputation: 3272

angular/ionic iframe issue on ios

I have an issue with my ionic app on iphone. Ionic writes this into the index.html:

<iframe src="gap://ready" style="display:none;">...</iframe>

The console output of the app loops this error about 40 times per second:

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

I guess everytime the dirtycheck of angular is working, this error is thrown. Where is the iframe comming from and how can I get rid of the iframe and the error?

Upvotes: 5

Views: 2659

Answers (1)

marcel
marcel

Reputation: 3272

Solution, simply add gap: to the following meta tag in index.html:

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

Upvotes: 11

Related Questions