Ionic3 Local notification and fcm it seems not working together


#1

I’m using ionic3 fcm plugin and local notification , everything work fine on android, but on ios when i’m in foreground the notification didn’t appear:

"@ionic-native/local-notifications": "^4.18.0",
"@ionic-native/fcm": "^4.18.0",
"cordova-plugin-fcm-with-dependecy-updated": "^2.4.0",
"cordova-plugin-local-notification": "^0.9.0-beta.3",

this._localNotifications.schedule({
            id: 1,
            text: (data.text ? data.text : data.description),
            icon: "file://assets/icon/fcm_push_icon.png",
            smallIcon: "file://assets/icon/fcm_push_icon.png",
            color: "#424242",
            foreground: true,
            data: {url: data.url}
          })

anyone know what’s the problem ?


#2

Foreground Parameter is optional also there can be issue related to the icons included or text included. Try to remove icon and small icon with fixed tex


#3

i removed icon and small icon, as text: ‘’ " .nothing change.
for more information the xcode console typed:
warning: Application delegate received call to application:didReceivedRemoteNotification: fetchCompletionHandler: but the completion handler was never called.


#4

eplacing println with NSLog can solve your the issue.