sarriaroman / FabricPlugin

Fabric.io plugin for Cordova or Phonegap
MIT License
198 stars 159 forks source link

Fails to install for latest cordova-ios version (5.0.1 and maybe 5.0.0) #155

Open 814k31 opened 5 years ago

814k31 commented 5 years ago

Installing with the latest cordova-ios version fails due to this error with cordova-fabric-plugin

Error Message: Failed to install 'cordova-fabric-plugin': CordovaError: Using "requireCordovaModule" to load non-cordova module "xcode" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

I believe Context.requireCordovaModule is now removed in cordova lib 9.0.0 which are used: https://github.com/sarriaroman/FabricPlugin/blob/master/hooks/lib/ios-helper.js#L23 https://github.com/sarriaroman/FabricPlugin/blob/master/hooks/lib/ios-helper.js#L78 https://github.com/sarriaroman/FabricPlugin/blob/master/hooks/lib/utilities.js#L32

Also mentioned: https://github.com/sarriaroman/FabricPlugin/issues/141#issuecomment-426960537

814k31 commented 5 years ago

Seems to be fixed in the active pull request #154

814k31 commented 5 years ago

And also in #153 ...

murilobeltrame commented 4 years ago

Same error here :/

jmprado commented 4 years ago

Use this fork to add the plugin to your cordova app:

ionic cordova plugin add https://github.com/jmprado/FabricPlugin/ --variable FABRIC_API_KEY=[your fabric key] --variable FABRIC_API_SECRET=[your fabric secret]

jmprado commented 4 years ago

The problem is that cordova-cli 9 changed the way to use xcode:

  1. Install node xcode module: npm install xcode
  2. Install the plugin from the fork above

Works on ionic cordova as well (tested).

jorgehclinhares commented 4 years ago

I have this problem now. @jmprado your fork solved it for me. Thanks!