sarriaroman / FabricPlugin

Fabric.io plugin for Cordova or Phonegap
MIT License
197 stars 157 forks source link

Change hooks #80

Closed fiahfy closed 7 years ago

fiahfy commented 7 years ago

I create the app based on Ionic2.

When I add a platform with the flowing command, the hook after_plugin_install is not fired.

$ ionic platform add ios
Adding ios project...
:
iOS project created with cordova-ios@4.3.1

Discovered plugin "cordova-fabric-plugin" in config.xml. Adding it to the project
Fetching plugin "cordova-fabric-plugin@~1.1.1" via npm
Installing "cordova-fabric-plugin" for ios
:
(Install other plugins...)

So I changed the hook timings.

Alexious-sh commented 7 years ago

Very funny. Instead of reporting cordova-cli bug you made local changes without testing. Did you try to remove ANY OTHER plugin after this? It fires rm script, which removes changes of this plugin :| I propose to revert it, because it brakes all of plugin installation system.

sarriaroman commented 7 years ago

Maybe my mistake on merge it without testing it with other plugins... It's not funny at all. Can you provide a solution? The message is fine but if there is an issue a PR is a better solution ;)

Alexious-sh commented 7 years ago

There are two solutions:

  1. Ask Cordova-CLI developers why after_plugin_install/before_plugin_uninstall are not firing when we add/remove platform, and if it's bug - fix it there.
  2. We can just try to use both install hooks (after_plugin_install AND after_platform_add).