Saturday, December 10, 2016
Cordova Application Hanging During Startup on iOS 10
If you have any cordova application in iTunes, you may have faced this issue since launch of iOS 10,. Either your app hangs at Start up or it will hang in case when there is a use of any plugin, like camera or location or any other native features.
This is because of content security policy. iOS 10 needs content security policy where you have to mention what types of content you will allow to load.
As you have notice cordova plugins are invoked gap:// and in iOS 10 it's not allowed by default so you have to mention this in content security policy.
Add following line in head section of your index.html file.
As you can see we have added gap: in allowed content src along with other source, now your app will work normally in iOS 10.
Hope this helps you.
Labels: Cordova, Cross Platform Application Development, Hybrid Application Development, iOS, iOS 10, iPhone, Xcode
Software Developer/Project Manager/Graphics Designer/Website Developer/Tester/Team Lead, Blogger and now an Author. Self employed professional playing more than one role at a time.
Email : firstname.lastname@example.org
Gtalk : email@example.com