question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

didReceiveMessage: not implemented

See original GitHub issue

Hi and thanks for an amazing plugin! I’ve implemented push notifications https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md on android and everything works fine. Now I try to do the same on iOS but unfortunately I have some problems.

I tired your culr example requests https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#ios-background-notification-example

and I got success message in console

{"multicast_id":5755092260544836688,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1549384955562803%fbf3b3ddfbf3b3dd"}]}

unfortunately there is no notification on phone and there is an error

5.15.0 - [Firebase/Messaging][I-FCM002019] FIRMessaging received data-message, but FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented

I test on real Iphone 7 device and use your plugin in version 7.4.1

I did also this provisioning hell https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#provisioning-hell but app doesn’t ask me about permission.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brndusiccommented, Mar 6, 2019

Hi @EddyVerbruggen, found solution for my problem:

import { Injectable } from '@angular/core';
import {init as initFirebase, getCurrentPushToken, registerForPushNotifications} from 'nativescript-plugin-firebase';

@Injectable()
export class FirebaseNotificationService {
    constructor() {
        initFirebase().then(() => {
            registerForPushNotifications({
                showNotificationsWhenInForeground: true,
                showNotifications: false
            }).then(
                () => console.log('registerForPushNotifications success'),
                () => console.log('registerForPushNotifications failed')
            )
        });
    }

    public getAuthToken(): Promise<string> {
        return getCurrentPushToken();
    }
}

In order to make app asks for permissions I needed to call registerForPushNotifications

0reactions
ashokIosDevcommented, May 17, 2019

Hi @EddyVerbruggen in ios onPushTokenReceivedCallback is not calling, i put this in app.component.ts

messaging.registerForPushNotifications({ onPushTokenReceivedCallback: (token: string): void => { console.log("Firebase plugin received a push token: " + token); },

    onMessageReceivedCallback: (message: Message) => {
      console.log("Push message received: " + message.title);
    },

    // Whether you want this plugin to automatically display the notifications or just notify the callback. Currently used on iOS only. Default true.
    showNotifications: true,

    // Whether you want this plugin to always handle the notifications when the app is in foreground. Currently used on iOS only. Default false.
    showNotificationsWhenInForeground: true
  }).then(() => console.log("Registered for push"));

  messaging.getCurrentPushToken()
  .then(token => console.log(`Current push token: ${token}`));

  this.pushSettings()

}

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIRMessaging received data-message, but ... - GitHub
FIRMessaging received data-message, but FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented #996.
Read more >
swift3 - Firebase 4.1.1 - Swift 3 - Stack Overflow
FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented - Firebase 4.1.1 - Swift 3 ... But I still have the warning so is there any ...
Read more >
sendMessageData does not call didR… - Apple Developer
I would need to return an array of dictionaries when polling the main app from the WatchKit extension. Yet it seems the only...
Read more >
Developers - didReceiveMessage: not implemented - - Bountysource
Hi and thanks for an amazing plugin! I've implemented push notifications https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/ ...
Read more >
Watch Connectivity: didReceiveMessage not called-swift
There are 2 session:didReceiveMessage methods in the WCSession. You should implement the one with a replyHandler on the Apple Watch side.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found