Flutter FCM Ios not showing on device

378

I had this issue a week ago

I don't see your code here for the app delegate.

You can please verify did you add the below code in your AppDelegate.swift if not then please add.

if (@available(iOS 10.0, *)) {
  [UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
 }

Also, make sure you are asking user permission

myFirebaseMessagingService.requestNotificationPermissions(
        const IosNotificationSettings(
            sound: true, badge: true, alert: true, provisional: false));

Change this line in your info.plist

 FirebaseAppDelegateProxyEnabled: false

If everything is good then uninstall the app and try again installing this works some time.

Share:
378
rameez khan
Author by

rameez khan

Updated on December 30, 2022

Comments

  • rameez khan
    rameez khan over 1 year

    I have add fcm in my application and all things but i can see notification body in my xcode console but in device its not showing also try in foreground mode not working.

    I add FirebaseDelegateProxyEnabled in my info.plist

    enter image description here

    I have added background mode and push notification

    enter image description here

    Even i have added APNs Authentication Key But still is not working. I don't know what is remaining i can see my notification in console but why its not showing in device i even i try to minimize the app

    enter image description here

    Here is my console its showing notification data

    2021-07-08 17:21:54.566047+0500 Runner[30106:10113438] flutter: on message {from: 110426208872, collapse_key: com.igidrive, notification: {e: 1, body: test again 123}}