We have an application that has CallKit feature. One problem I am facing is that if the user sets Device Do not Disturb mode on, then CallKit incoming notification is not shown if the device is locked. There is a CallKit error that is CXErrorCodeIncomingCallErrorFilteredByDoNotDisturb when the device is in this mode, but I want to still show the notification to the user if a call arrives.
Note: I've found that WhatsApp still shows the incoming CallKit notification even when DND is enabled. Any help/suggestion will be appreciated.
If you want to display a notification when you receive a
CXErrorCodeIncomingCallErrorFilteredByDoNotDisturb
error, you could do the following:When do-not-disturb is active, WhatsApp doesn't display a notification after receiving an audio call, it only displays notifications for video calls. That's because they use CallKit and PushKit only for audio calls. For video calls they use normal push notifications.