How to customize short preview of notifications in iOS 10+

前端 未结 2 1658
忘了有多久
忘了有多久 2021-01-20 19:04

I have implemented iOS rich notifications in my app based on Local and Remote Notification Programming Guide.

I watched WWDC Introduction to Notifications, Advanced

2条回答
  •  悲哀的现实
    2021-01-20 19:31

    I think (I'm not 100% sure) that you can only display an Attachment Image in the Notification banner, because you don't have Storyboad or UI file for this. It is the default Notification banner design.

    You can follow this great guide (links below), it helps me understand Notification Content Extension and Notification Service Extension and all the logic behind and how it really works.

    You can try to make some adjustments to the project, trying with anything else than ImageView, but as far as I know, the attachment is by default positioned at the right corner, as a miniature.

    I am interested if you find additional informations.

    Here is the great links that helped me build my Notification Feature in my App.

    Sources:

    Rich Notification Guide

    Notification with Attachment

    PS: I am also sad and disapointed that the expended view only appears with 3D Touch (People don't use it, 3D Touch is a failure to me).

提交回复
热议问题