iam doing a project in ionic 3. Here in my project I’m using FCM version 2.9.2 for push notifications. There is no problem in android. In IOS, FCM Backgroundmode notifications is working fine. To handle FCM foreground notification i used the Local Notification plugin
this plugin iam using
Here is the code to handle local notification when ever i receive FCM foreground notification
declare var cordova;
//Code to handle local notification
cordova.plugins.notification.local.schedule({
title: 'My Local notification',
text: 'Notification From Foreground...',
foreground: true
});
The problem is when ever i receive a FCM notification in foreground, instead of showing a Local notification i am getting an alert with message(Testing fcm notification with alert).
My requirement is to show a local notification when ever i receive a fcm notification in foreground. Is there any way to handle this.
I need the same , when i receive notification in foreground the xcode console typed:
“Application delegate received call to application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called.”
any idea ?
Hi everyone… I’m struggling with this issue from more then month and finally today I’m able to run both fcm and local notification plugin together on IOS.
It works fine on background and foreground, but when you tap the notification the app crashes because onclick event from local-notification is captured by fcm plugin. I haven’t managed to solve this yet.