Push message incidentially not received on iOS-device - ios

Over the last few months, we have been integrating Firebase Cloud Messaging into our project. The project uses the Firebase SDK, wrapped in a Cordova plug-in (cordova-plugin-firebase).
It is all working great, that is for Android at least. For iOS it is partially working. We received a few complaints from customers about them not receiving notifications, while all of the other iOS devices were correctly receiving messages.
After on-site device checking, we found out:
The device successfully obtained a FCM-token.
This FCM-token was subscribed to all the correct topics.
This FCM-token had the latest app version.
Both individual push-notifications (to the device), as well as topic notifications were not received
Messages from the Firebase Cloud Console were not received either
sometimes reinstalling the app worked
Receiving over Cellar/WiFi did not change anything
Permission was granted to receive push notifications
It is very hard to debug an issue like this, because installing a development version fixes it for some reason.
What are possible reasons for Firebase to not deliver the message to iOS? Or is it possible to see whether a delivery to APNS fails within the Firebase Console?

Related

iOS app needs reinstall to receive push notifications

I have encountered a strange behaviour with an iOS app that my team has developed.
The users can enable notifications in the app and receives notifications from Firebase Cloud Messaging. We had complaints that the notifications were not coming through, so after some basic troubleshooting, we discovered the only solution was for the users to uninstall the app and reinstall it while allowing the notifications when they start it the first time.
Why did this happen? Did something change from Apple's side? Publishing a new version of the app fixes the problem?
Thanks

iOS Remote Notifications not being sent to iPhone

I am using Firebase to send remote notifications to my iOS app but recently my remote notifications being sent do not display on the phone. After debugging the app and studying the console log I noticed that the phone was receiving the signal from the server for the notifications but seems to encounter a TLS-related error as shown in the screenshots below.
I have updated all the certificates and profiles involved in building the app and the app builds fine with no errors, but I am not sure how to progress in solving this. Any help would be greatly appreciated.

Firebase iOS push notification receiving but sometimes not?

I have implemented push notification in my iOS App using Firebase SDK and I am successfully getting push notifications from Firebase console as well as from server.
But on many occasions, I wait and wait, and even send 5-6 notifications from Firebase console but not received on App. I tried to change network (both Mobile data & WiFi) but still not receiving. After waiting for an hour and more, suddenly it starts working (I am not re-installing App).
What may be the reason? If network is an issue, then why is it not woking though I change my network to WiFi having good bandwidth?

Flutter notifications not working on android devices

I've been following this guide to try out notifications, https://medium.com/#nitishk72/flutter-local-notification-1e43a353877b, and the main API documentation for the flutter local notification package but I keep getting various errors, on a modern phone it vibrates only and no notification pops up, on an older device (emulator), i get this error android.app.RemoteServiceException: Bad notification posted from package com.xxx: Couldn't create icon: StatusBarIcon(icon=Icon(typ=RESOURCE pkg=com.xxx id=0x7f040000) visible user=0 ) can anyone help?
I wasn't able to test on an iOS device
I was able to solve using a notification service as alternative. I really recommend OneSignal. It is a Notifications Service that works on multiple platforms and recently they added Flutter support to OneSignal.
There is SDK Documentation pages for Flutter:
Setup Guide for Flutter Project
OneSignal for Flutter SDK Docs

Automated Push Notification Testing with XCTest

I'm attempting to automate the testing of my push notifications using XCTest and Continuous Integration with Xcode Server.
As far as I can tell, I have correctly configured my push notifications, as I receive them correctly when the app is running. The issue is, when I run a test (even on a physical device) I don't receive the notification. I have confirmed on both the sending device as well as the backend that the push notification has been sent. As far as I know, you cannot receive push notifications on iOS simulators, but I am running the test on an actual device, so I was assuming this would be different.
Obviously I can check manually to see if the information is consistent through the sending device, backend and receiving device, but I was hoping to automate this entire process.
Thanks for the help.
While there is no way to deal with PNs on Simulator with Apple-provided instruments, there is magic 3-rd party toolset to help on it:
https://github.com/acoomans/SimulatorRemoteNotifications
SimulatorRemoteNotifications is a library to send mock remote notifications to the iOS simulator.
The library extends UIApplication by embedding a mini server that listen for UDP packets containing JSON-formated payload, and a service to send notifications to the mini server.
This project includes the iOS Simulator Notifications MacOSX app to help you send the mock notifications.

Resources