2

I'm developing on cordova and iOS/android since a long time, before Xcode 8 everything was working and on android still everything is working. Just on iOS under this constellation the plugins are NOT AT ALL working as expected. That means all plugins start reacting first after the Home button is pressed. This is really weird. Following is the list of plugins I use:

com.cordova.plugins.sms 0.1.10 "Cordova SMS Plugin"
cordova-plugin-camera 2.3.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-contacts 2.2.0 "Contacts"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-device-orientation 1.0.4 "Device Orientation"
cordova-plugin-file 4.3.0 "File"
cordova-plugin-file-transfer 1.6.0 "File Transfer"
cordova-plugin-geolocation 2.4.0 "Geolocation"
cordova-plugin-inappbrowser 1.5.0 "InAppBrowser"
cordova-plugin-navigationbar 1.0.31 "Cordova NavigationBar plugin"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-whitelist 1.3.0 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 1.8.2 "PushPlugin"

Just to clarify, it worked since Xcode 5 with not a single problem and I really tried everything possible I could imagine, e.g. removing all plugins separately and trying different versions od cordova, npm, node (just because of frustration). The problem occurs on native device as well as inside of the simulator. Has anyone any advice for that? I really have no single idea anymore....

Thx Mani

1 Answers1

1

This sounds similar to the symptoms described by Chis Rae in his comment on my answer to my own question.

Try adding the Content-Security-Policy meta tag:

<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'">
Community
  • 1
  • 1
DaveAlden
  • 30,083
  • 11
  • 93
  • 155
  • in my case the solution was the "gap://ready file:" for the default source. Everything else was already there. – Mani Afschar Yazdi Oct 13 '16 at 06:46
  • 1
    still wondering this absolutly strange behavior, either a plugin works, or it does not work. But working partly and only after you leave the app and re-enter it, sounds wiered and bugy. It is reproducable... – Mani Afschar Yazdi Oct 13 '16 at 06:49
  • 1
    Oddly, I'm having exact same issue. Unluckily, adding the entries in the meta tag didn't work for me. – Ladmerc Mar 01 '17 at 22:42
  • @Ladmerc - Did you able to find out what was the issue? I couldn't make it work even after adding meta tag. – nOOb iOS Nov 06 '17 at 14:40