Not Receiving Push Notifications from Firebase

Firebase cloud messaging notification not received by device

You have placed your service outside the application tag. Change bottom to this.

<service
android:name=".NotificationGenie">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>

</application>

Firebase Push notification not receiving on Android 12

Found the solution. Which was to add android:exported="false" on the Firebase service tag within the AndroidManifest.

not receiving push notification from firebase But with Pusher app

Here is the steps to cross check your issue,

  1. Notification Capabilities has to be enabled.
  2. Certificate you created on apple member center should enable the push
    notification
    enter image description here
  3. In firebase console go to settings -> project settings -> cloud messaging -> check the server key

    1. This key and the key what you gave to you server team should be same
    2. Check APNs Authentication Key or APNs Certificates added or not.
    3. If you are using APNs Certificates, that should be same that you generated in the appId in the member center
      enter image description here
  4. get the fcm token from the xcode console -> go to firebase console -> grow -> cloud messaging -> new notification
    -> and try test on device. if you receive notification client side (device) has no issues. if not server side has to double check the server key.
  5. Add your googleServiceInfo.plist to your project. add the reversed key in your app info.
  6. in Appdelegate, configure your firebase
    FirebaseApp.configure()

Update, As per your question in the comment, am updating this question.
To make use of NotificationService Extension, you notification must include mutable-content property in the notification payload. using fcm api you can do that. put these in the post man,

https://fcm.googleapis.com/fcm/send

in the headers, add your server key (you can get this from your firebase console)

enter image description here

in the body add this payload to fire notification. this will trigger your Notification Service Extension.

{
"notification": {
"title": "1",
"body": "",
"click_action": "",
"icon": "",
"mutable_content": true,
"content_available": true
},
"registration_ids":["add your fcm token"],
"data": {}
}

enter image description here

As per the tutorial:
https://code.tutsplus.com/tutorials/ios-10-notification-service-extensions--cms-27550

enter image description here

Unable to receive IOS notifications from Firebase Console

Go to firebase->Project Settings->Cloud Messaging -> then scroll down to Apple app configuration and make sure you've provided APNs Production Certificate or not, if not then generate production certificate and upload it there. Alternatively i suggest you to upload APNs Authentication Key instead of certificates.

Preview Image

Not Receiving push notifications from firebase

As you have tried refreshing the certificates and checking that other things are valid, try one more thing. In your info.plist file set

FirebaseAppDelegateProxyEnabled = YES

This worked for me.
Image



Related Topics



Leave a reply



Submit