Firebase Cloud Messaging notification not received on iOS
It turned out, only messages that do not contain a notification object are delivered if your app hasn't yet been approved to the App Store.
After having the first version out, push notifications work for your app, even in debug mode.
Firebase push notification is not received on the iOS device. Although console logs the message, it is received on device
There are two ways to receive notification:
when the app is closed/inactive and you get the payload in didFinishLaunchingWithOptions:
when the application is open/active and currently visible you get payload in didReceiveRemoteNotification:
When your application is closed, iOS take care of displaying a notification (if notification extension not developed) and launch your app when you tap on it.
If your application is open you have to take care of displaying this notification or ignore it.
Here what official documentation says:
When local and remote notifications are not handled directly by your
app or the user, they are displayed in Notification Center so that
they can be viewed later. Use the
getDeliveredNotificationsWithCompletionHandler: method of the shared UNUserNotificationCenter object to get a list of
notifications still being displayed in Notification Center. If you
find any notifications that are now outdated and should not be
displayed to the user, you can remove them using the
removeDeliveredNotificationsWithIdentifiers: method.
official documentation
Firebase notifications received on iOS 12 but not received on iOS 13
It looked like there is an issue in Firebase - APNS integration using the auth key method (at least for my case with the bellow information)
The test made on XCode version 11.4, iOS 12.4.2, 13.4 and 13.4.1
There is an issue in Firebase push notifications when using the auth key and should use the p12 certificates instead
I checked direct APNS push notifications (without firebase) it's working fine
I checked also using 2 methods APNS auth key and p12 certificates, it worked on p12 certificates but not for auth key
Related Topics
Swift's Decimal Precision Issue
Weird Behaviour in Swiftui+Combine When Class -> Struct
Preparing for Swift 4 - Unsafemutablepointer Migration to Unsafemutablebufferpointer
Expose an Interface of a Class Loaded from a Framework at Runtime
Loading Many UIimages from Disk Blocks Main Thread
How to Get User Nearby My Location in Geofire,Firebase
Error: Missing Return in a Closure Expected to Return 'Uiviewcontroller' (Xcode, Swift, iOS 13)
iOS Application Support Directory Exists on Devices by Default
What's The How to Access a Swift Package Item from Objective-C
How to Download Video Urlstring from Firebase Database Not Storage in Swift
How to Make Phone Calls in Swift
How to Convert a Pair of Bytes into a Float Using Swift
Streaming .M3U8 Using Mpmovieplayercontroller Does Not Work
Trying to Display Location Data from Firebase to Mapkit
How to Read The Property Values of a JSON Error Object Using Combine in Swift