How to implement rich notifications in ios 10 with Firebase

眉间皱痕 提交于 2019-11-27 07:10:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!