Search code examples
iosxcodecordovacordova-pluginsupdates

Cordova Plugins not working after Xcode and Cordova update (OSX)


I recently dupdated

  • Xcode from 7.3.1 to 8.2.1
  • Cordova from 6.1.1 to 6.5.0

on my OS X elCapitan 10.11.6.

Before the update everything works just fine, my cordova app compiles and all plugins are working as expected. BUT after the aforementioned updates none of my plugins are working.

I already tried:

  • removing and adding platform ios
  • removing all plugins and readding them
  • creating a new cordova project, adding my www and add the plugins (Upgrade Cordova Version of an iOS app)
  • creating a new cordova project (via cli) and adding just the camera plugin (to see if simple plugins are working)

no success, none of the plugins are working, but it compiles without errors.

When I do a rollback to Xcode 7.3.1 and cordova 6.1.1 everything is working again. It already cost me two days. Any hint will be appreciated!


Solution

  • Your problem sounds similar to this one. You can confirm this by seeing if your plugins start responding after you put your app in the background (press Home button) then back into the foreground.

    Since you have upgraded to XCode 8, you'll now be building against the iOS 10 SDK, hence a stricter Content-Security-Policy is applied. To resolve this, see this answer.