wizpanda / cordova-plugin-firebase-lib

This repository is moving & merging to https://github.com/wizpanda/cordova-plugin-firebase-lib to avoid confusion to developers.
https://www.wizpanda.com/
MIT License
68 stars 38 forks source link

Other custom plugin with swizzled didFinishLaunchingWithOptions #41

Open l3ender opened 4 years ago

l3ender commented 4 years ago

I have another Cordova plugin (custom for my organization) that swizzles the didFinishLaunchingWithOptions as we need to run some items on app startup. However when I installed this plugin I am getting issues as they both try and swizzle the same method. If I comment out one or the other, the uncommented one works. I'm using the latest version of this plugin (5.1.1).

Our code base is quite large so I will try and create a separate repo the demonstrates this. In the meantime, I wanted to see if there were any recommendations on how to handle this situation.

Thank you very much for taking over this plugin. It is very nice to be able to have an option that is active and updated!

sagrawal31 commented 4 years ago

I have been trying to find out some workarounds for this but couldn't get this functioning. Maybe a separate repo which can demonstrate this problem can help. Were you able to get one?

l3ender commented 4 years ago

I think I might have found a solution. The method name I was using was the same as the one in this plugin (swizzledDidFinishLaunchingWithOptions). When I used a different name, it seems to work.

I still plan on creating a sample project to confirm, but I haven't yet done that. When I do I will share it here for info.

If the above solution works, it might make sense to rename the current method to one specific to the firebase project to help avoid future conflicts, i.e. firebaseLibDidFinishLaunchingWithOptions.