-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Time-Sensitive notifications on iOS 15 #659
Comments
When implementing ".criticalAlert" the ".provisional" authorization should be implemented at the same time. |
+1 - really need this 👍 |
Any update on when this might be implemented? |
I was looking for that! |
I got a solution to use iOS Critical Alerts. This is more related to issue #1759, which was closed and referenced to this issue. Note: Your app needs Apple Critical Alerts entitlement to have the critical alerts working. iOS Critical Alerts
...
public func requestPermissions(with completion: ((Bool, Error?) -> Void)? = nil) { ⬇️
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge, .criticalAlert]) { granted, error in
completion?(granted, error)
}
}
...
And you can git ignore the custom-plugins code, but the the new custom packages. # iOS Critical Alerts
custom-plugins/*
!custom-plugins/capacitor-local-notifications-5.0.6.tgz
!custom-plugins/capacitor-push-notifications-5.1.0.tgz |
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 theUNMutableNotificationContent
. TheinterruptionLevel
variable is an enum with the following values: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: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
The text was updated successfully, but these errors were encountered: