5

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?

1 Answer 1

11

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'"/>
Sign up to request clarification or add additional context in comments.

4 Comments

This also fixed my problems with phonegap barcode scanner plugin not loading on iOS 10 !!!
Where to add this line.i am facing an issue barcode scanner is opening in iOS 10.
Add/extend this in the index.html header. I am using v1.2.4-nightly-1917, which already has a meta tag, but it's missing the 'gap:' content.
i've been working on this bug for a good part of a day. Thank you Marcel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.