EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase

Home Page:https://firebase.google.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[iOS] TypeError: Cannot set property 'delegate' of null

phenric opened this issue · comments

When I'm using Nativescript with Firebase for pushing notification I've an issue on iOS but not on Android:

TypeError: Cannot set property 'delegate' of null

The error comes from the module in the messaging.ios.js file. In the _registerForRemoteNotifications method, the line 351 fails with

FIRMessaging.messaging().delegate = _firebaseRemoteMessageDelegate;

I follow the guide of this repo and since I'm using Angular I settle the notification in app.component.ts as explained here https://github.com/EddyVerbruggen/nativescript-plugin-firebase#angular.

Does someone has an idea on how I could solve this?