Firebase iOS push notification receiving but sometimes not? - ios

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?

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.

Push message incidentially not received on iOS-device

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?

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.

iOS silent push notification only works when connected to xcode

I have an odd issue.
I recently updated my Xcode to 6.1.1 to make a change to an app I previously released with Xcode 5 (working great). Now for some reason with the new Xcode when I test my background silent push notification it only completely works when I have my iPhone connected to my Mac?
What the app does is when it gets a silent push the app retrieves data from a server. I added the default sound to the silent push for testing, and I've confirmed that the app does get the push but it does not connect to the server to get the new data. But if I plug in the lightning cable to my mac everything works great, gets data from server etc.
I'm not sure what to do? Any ideas or direction is greatly appreciated.
Thanks!
I got no problem to send silent push to my app, even if the app is not connected to Xcode BUT you have to notice that silent push notification is being delivered only if your app is running in the background. If you force quit your app using double tap on iPhone home button, the notification is ignored.
It is probably an Apple rule to let user completely kill an app and stop any outgoing/incoming connection

Resources