Open ShawnPavel opened 8 years ago
Thanks, I'll check it out.
This is not "stealing" the AppDelegate
. This plugin instructs you to implement the AppDelegate
. This AppDelegate
is an asset of your application, not the plugin.
Firebase is apparently checking for the existence of an implemented AppDelegate
and adding their required method if it already exists.
Just commenting to share knowledge as we ran into this same issue.
We used firebase plugin as well as this one and the firebase cloud notifications were completely stopped due to adding this plugin. From my understanding the following line
app.ios.delegate = MyDelegate;
Will override the functionality added to the delegate by nativescript-plugin-firebase.
I used the fix described in ShawnPavel's post above and both plugins appears to function now
In the readme for setup it is stated to do the following:
However, this has created some problems in my application. A lot of other plugins use the app delegate to perform numerous tasks. For instance the nativescript-firebase-plugin uses it to do google/facebook authentication and push notifications.
I have fixed this problem by utilizing the following code inside my Nativescript Angular app instead:
I took this method from the firebase plugin code. This allows other plugins to continue utilizing the app delegate without interruption. I don't know if it will work in base nativescript or not. It may be possible to incorporate this directly into the plugin (like the firebase plugin), but I am not sure.