Strange behavior only in iOS cause app to wait/pause until I leave screen

Hi guys,

I really hope you can help me out here because I am a little bit lost. I do right now my second Ionic app and feel pretty stable with all but experience now a strange situation and not even know where to start looking for. I try to explain.

My app uses a couple of plugins like the cordova-barcode-scanner, cordova-plugin-facebook4 and cordova-plugin-x-socialsharing. All works fine in Android and both plugins work as expected, how ever in iOS not.

The problem is difficult to describe. What happen is that ALL plugins do work but all have some type of PAUSE until I switch the screen. Lets say I want to scan a Barcode. I press the button in my app which suppose to open the videocamera… how ever nothing happen and you can wait minutes. BUT if you doubleclick the home button to switch the apps for example the camera open and you can switch back to scan your barcode.

Same thing with facebook login plugin or socialshareing. I press the buttons or start the functions but nothing happen at first… if I click on the main menu button from my app (bascially leave the current view) i can see the plugin continue and open for example facebook. same happen if I use the home button and switch apps.

every single plugin in iOS stops/pause until I switch app, or leave the current ionic-view…than all continue normal and work as expected.

anybody has any idea?
in android all normal…

thank you all in advance

I figured it out.

The problem appear to be on iOS 10.x devices. It happen with all plugins in either Simulator or real devices. The reason is that you need in your Content-Security-Policy a small extra parameter for iOS 10.x to work with the plugins.

I just changed “default-src *;” to “default-src * gap://ready file:;” and all plugins work flawless.

For more detailed infos check out which was 100% the issue for me too.

1 Like

This is old, but great description of your issue, because it matched my issue to a T!
The solution did the work to fix it as well.

1 Like

I am glad it helped you. Just one doubt. This happened to you with which ionic version? Since my problem was 3 years ago with ionic 1 I wonder if this works with any version of ionic?