问题
I have been looking for a solution for this since quite a while. But I am not able to find anything. I have implemented Push Notifications for iOS using FCM. But I don't know if FCM supports iOS 10 rich notifications. If it does, I didn't find code to implement it. Thanks in advance.
回答1:
I have the same question why rich notification not working.. and the problem is with FCM mutable-content
payload .. it turns in to gcm.notification.mutable-content
when payload receives and that's why there is a problem which is not resolved yet.
For more information, you can check this issue from github.
Its resolved now.. you can check that link and also check this answer AL.
回答2:
Just an update in relation with @ElCaptainv2.0's answer.
The mutable_content has been added for FCM:
Currently for iOS 10+ devices only. On iOS, use this field to represent mutable-content in the APNS payload. When a notification is sent and this is set to true, the content of the notification can be modified before it is displayed, using a Notification Service app extension. This parameter will be ignored for Android and web.
Note: The parameter value should be boolean
, not Integer
.
It was also mentioned in the GitHub thread just a few hours ago by kroikie.
来源:https://stackoverflow.com/questions/40713145/how-to-implement-rich-notifications-in-ios-10-with-firebase