iOS 12 has added critical alerts. The APNS payload has the sound dictionary to support critical alerts. Is there an equivalent sound dictionary support in FCM payload to send FCM notifications to iOS devices.
相关问题
- Core Data lightweight migration crashes after App
- Plugin with id 'com.google.gms.google-services
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- How can make folder with Firebase Cloud Functions
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
There is currently no sound dictionary support in FCM which is equivalent to iOS' sound dictionary. As I'm sure you're already aware of, the counterpart of FCM with APNs' when it comes to sound is the
sound
parameter:However, reading from the
UNNotificationSound
docs, maybe you could try adding adata
message payload that contains an identifier (e.g."isCritical": "true"
) then have your app handle it as needed.Answering my own question.
I had to rely on notification extension to do the magic as the FCM payload doesn't support the iOS sound dictionary. I send the "critical" flag set to 1 as part of FCM data payload and use it in notification extension to mark a notification as critical.