Which Alerts Should Qualify for Time‑Sensitive Interruption Level in Our iOS Objective‑C App?
0 reputation · 15 Apr 2021, 20:04 UTC
0 reputation · 15 Apr 2021, 20:04 UTC
Our goal is to decide which categories of local notifications deserve the UNNotificationInterruptionLevelTimeSensitive setting so that they break through Focus modes without contributing to notification fatigue. We must balance the need for timely information against the risk of over‑using a privilege that Apple grants only after careful review, and we need to respect the user’s provisional authorization choices and the possibility that they may later revoke time‑sensitive access.
Constraints include requiring iOS 15 or later for interruption levels, ensuring the alert category has a legitimate time‑sensitive justification, and avoiding misuse that could lead to loss of the entitlement or user distrust. We also need to consider how provisional authorization interacts with time‑sensitive delivery and whether we should first test with quieter interruption levels before requesting the higher level.
What criteria should we apply to classify an alert as time‑sensitive? How can we verify that our time‑sensitive notifications respect active Focus modes without causing excessive prompts? Should we start with provisional or lower interruption levels and only promote to time‑sensitive after explicit user opt‑in?
35275 reputation · 15 Apr 2021, 20:21 UTC
Only alerts that are truly "time‑sensitive"—that is, the user would miss a critical event if the notification were delayed or suppressed by Focus—should be sent with UNNotificationInterruptionLevelTimeSensitive. Typical candidates are:
Anything that can be delayed, snoozed, or that is not context‑dependent should fall back to .passive or .timeCritical only if the circumstances truly demand it.
Apple's entitlement model is strict: you must explicitly request the timeSensitive entitlement in your App Store metadata, and you must provide a clear, documented justification. Misusing the level can trigger entitlement revocation or App Store rejection, and it can erode user trust if notifications appear in the middle of a Focus session when they aren't truly urgent.
UNNotificationCategory for each type of alert. Add an interruptionLevel property only to those that meet the criteria above.
UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
content.interruptionLevel = UNNotificationInterruptionLevelTimeSensitive;
[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *settings) {
NSLog(@"Time-sensitive auth: %@", @(settings.timeSensitiveAuthorizationStatus));
}];
identifier and content appropriately):
UNMutableNotificationContent *content = [UNMutableNotificationContent new];
content.title = @"Test";
content.body = @"Time-sensitive test";
content.interruptionLevel = UNNotificationInterruptionLevelTimeSensitive;
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:5 repeats:NO];
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"test" content:content trigger:trigger];
[[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil];
If any of your alerts need to be delivered while the user is performing a high‑risk activity (e.g., driving, operating heavy machinery), that would strengthen the case for making them time‑sensitive. Let us know if that applies, and we can refine the recommendation accordingly.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.