Vancent
Vancent

Reputation: 477

Cordova freezes on loading page, Cordova 4.2.1, iOS 10.0

I have been developing with cordova for a while and never seen this before, which is my app hangs during loading of the first page. If I press home button and then click on my app or swipe up or down, the account page can be successfully loaded. Here is the link (http://pan.baidu.com/s/1pLU2txp) to one downsized project which shares the same problem. Thanks a lot in advance for your concern and help...

Upvotes: 0

Views: 97

Answers (1)

Vinodh
Vinodh

Reputation: 5268

OK, I found the problem and the solution thanks to this post:

It seems that iOS 10 requires additional entries in the Content-Security-Policy meta tag, namely gap://ready and file:. After adding these, my Content-Security-Policy looks like this:

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

And the app starts up and works fine on iOS 10.

Hope this helps others.

Upvotes: 1

Related Questions