'How to enable iOS time-sensitive notifications switch in app settings?

I am working on changing types of notifications in my app to time-sensitive and active on iOS 15+. I noticed that if I go to iPhone settings -> Notifications -> and open apps like Uber or FB Messenger I see that they have a separate flag that enables time-sensitive notifications whereas other apps do not. See attached examples of Reminders, Instagram, Facebook, and Uber.

My developer colleague and I cannot find proper documentation that explains how to enable such setting for our users. Does it mean that any notification that we highlight in code as time-sensitive will be delivered as such be default without users' additional consent? Any advice?enter image description here



Solution 1:[1]

I've tested it on iOS15, and if you want to send time-sensitive notifications.

  1. go to Signing&Capabilities, add Time Sensitive Notifications

enter image description here

  1. Install app to your iPhone, then allow notification, you can see Time Sensitive Notifications switch display in setting. And it's on by default

enter image description here

  1. Send Time Sensitive Notifications, set interruptionLevel to timeSensitive.
    let content = UNMutableNotificationContent()
    if #available(iOS 15.0, *) {
        content.interruptionLevel = .timeSensitive
    }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 wlixcc