Rich push notification not triggered properly if device is locked

时间:2018-01-23 19:33:37

标签: ios apple-push-notifications

Situation

I have a working setup with rich push notifications, where a notification service extension takes care of pre-processing incoming push notifications (we read some additional data from the userInfo dictionary in the payload). After receiving and reading the push notification, a custom view controller (a Notification Content Extension) displays some of the additional data.

We use the "content-available" field and a category for the notification, as you would according to the documentation.

 Problem with locked device

All of this is working fine: we can receive rich notifications with a custom sound as long as the device is not in locked mode (e.g. when you need the pin or fingerprint to unlock it). As soon as the device is locked and a push notification is received, it will fallback the system sound and subsequent opening of the content extension through the message center will show an incomplete rich notification screen, because some of the needed values are missing.

I could not find any information on this behaviour, is there a way to make it work properly or is it "by design"?

I'm seeing this on iOS 11.

0 个答案:

没有答案