DarwinInterruptionLevel
Presentation urgency on iOS 15+ and macOS 12+.
Set DarwinOptions.interruption_level to control delivery
timing and how a notification interacts with system interruption controls. Available
presentation and sound permissions still apply.
Inherits: enum.Enum
Properties
ACTIVE- Presents the notification immediately, lighting the screen and allowing sound.CRITICAL- Presents a critical alert that can sound through mute and Do Not Disturb.PASSIVE- Adds the notification quietly to the notification list.TIME_SENSITIVE- Presents time-sensitive information immediately, subject to user settings.
Properties
ACTIVEclass-attributeinstance-attribute
Presents the notification immediately, lighting the screen and allowing sound.
Uses ordinary notification behavior and respects Focus and notification summary settings. Appropriate for updates that merit attention without requiring an immediate response.
CRITICALclass-attributeinstance-attribute
Presents a critical alert that can sound through mute and Do Not Disturb.
Reserve for urgent health or safety alerts. Requires:
- Apple's approval of the critical-alert entitlement for the app, which Apple grants on request to apps such as medical, health, and public-safety apps. Once approved, enable the capability on the app's App ID.
The entitlement in the app, declared in
pyproject.toml:[tool.flet.ios.entitlement]"com.apple.developer.usernotifications.critical-alerts" = trueUse
[tool.flet.macos.entitlement]for macOS.- The user's critical-alert authorization, requested with
critical=TrueinNotifications.request_permissions.
PASSIVEclass-attributeinstance-attribute
Adds the notification quietly to the notification list.
Does not light the screen or play a sound. Appropriate for information the user can read later, such as a recommendation or routine status update.
TIME_SENSITIVEclass-attributeinstance-attribute
Presents time-sensitive information immediately, subject to user settings.
Can bypass notification summaries and Focus when the user allows time-sensitive notifications. Add the Time Sensitive Notifications capability to the iOS app. Use for events that need attention now, such as an imminent delivery, rather than ordinary updates.