强制退出应用程序时未收到丰富的通知

Rich notification not received when app is force quit

此问题与 Appboy/Braze SDK 有关。至少我希望如此。

如果应用程序终止并发送示例 standard/simple 推送,我会收到通知。然而,丰富的通知根本没有出现。

此丰富的通知以推送故事的形式实现,其中有多个页面,您可以滚动浏览通知。

当应用程序处于前台或后台时一切正常。

任何想法可能是什么问题?

问题出在 APNS 负载上。 alertaps 目录中的值为空字符串。

控制台中的日志也显示了这两个日志。

Received remote notification request [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]

Not delivering user visible notification because it has no alert, sound or badge

根据 documentation:

To support a background update notification, make sure that the payload’s aps dictionary includes the content-available key with a value of 1. If there are user-visible updates that go along with the background update, you can set the alert, sound, or badge keys in the aps dictionary, as appropriate.