Implement authorization request for critical alerts on ios #572
Labels
Cloud Messaging
Related to Firebase FCM / Push Notifications / APNS
feature request
New feature request
ios
relates to iOS platform
Feature request
Hi,
we would like to use critical alerts in iOS but the plugin does not provide any way to request the permission to do that.
Another problem might be to include the entitlements in the build process but I'm sure that's not a problem of this plugin.
I played around with the existing code and got it working by adding
UNAuthorizationOptionCriticalAlert
in https://github.com/dpa99c/cordova-plugin-firebasex/blob/master/src/ios/FirebasePlugin.m#L294Unfortunately I'm not a Objective-C/iOS developer, so I lack the knowledge to implement the feature properly (with checks for iOS >12.0, make it optional in the
grantPermission()
method, etc.) and directly provide a PR 😞With this implemented it would be possible to send critical alerts to the app which would notify the user even in silent mode.
Here is a short overview on how to use it: https://medium.com/@shashidharyamsani/implementing-ios-critical-alerts-7d82b4bb5026
Tanks a lot in advance! :-)
The text was updated successfully, but these errors were encountered: