iOS 10 issues, could be something with ngZone

Hi!

Im using Ionic2, the facebook plugin (cordova-plugin-facebook4) and Camera (cordova-plugin-camera) plugin.

Everything works perfectly fine on iOS 9.

BUT on iOS 10 whenever I want to use fb plugin or camera NOTHING HAPPENS until I touch an input-field, or double tap Home button and go back to the app. Then suddenly it works. But if I want to use fb-plugin or camera again nothing will happen until I double tap Home or press on an input-field.

Also console.log is not printing either until I press Home twice or press on an input field.

It feels like the whole app is running outside the “main NgZone”.
Like when I tap a button, the method that is tied to the button doesnt respond until I press Home twice or press on an input field.

Any Ideas? :slight_smile:

Ok I’ve solved it!

After hours of searching I found a guy who recommended removing

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

from the index file. FOR SOME REASON IT FIXED THE ISSUE. I’m not sure why.

1 Like

I guess it’s because CSP in Safari has gotten much more strict. Also Ionic 2 still doesn’t support iOS 10 officially. For more information check out the following issue:

Does Ionic2 not support iOS10?