ionic-team / ionic-team/capacitor-local-notifications
Support for Time-Sensitive notifications on iOS 15
- Dominant language
- Kotlin
- Stars
- 0
- Forks
- 0
- Avg merge
- 11h 50m
- Merged PRs (30d)
- 2
Description
## Feature Request
### Plugin
Local Notifications
### Description
Support for Time-Sensitive notifications on iOS 15+. Time-Sensitive notifications allow the developer to schedule notifications that are important to bypass the Focus active mode or the system `Do not disturb` settings.
### Platform(s)
iOS (15.0+)
### Preferred Solution
We should add the new variable `interruptionLevel` inside the `UNMutableNotificationContent`. The `interruptionLevel` variable is an enum with the following values:
```
case passive = 0
The system adds the notification to the notification list without lighting up the screen or playing a sound.
case active = 1
The system presents the notification immediately, lights up the screen, and can play a sound.
case timeSensitive = 2
The system presents the notification immediately, lights up the screen, and can play a sound, but won’t break through system notification controls.
case critical = 3
The system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound.
```
Maybe add an interface to be exported through capacitor so that developer can get these allowed values.
Also, developer must enable the correct value in `App.entitlements` for this to work:
```
com.apple.developer.usernotifications.time-sensitive
```
The above should be added to the documentation too.
### Additional Context
Overview:
https://developer.apple.com/videos/play/wwdc2021/10091/
Relevant apple docs:
https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent
https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent/3747253-interruptionlevel
https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.