Skip to content
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

Implement authorization request for critical alerts on ios #572

Closed
cels opened this issue Dec 8, 2020 · 5 comments
Closed

Implement authorization request for critical alerts on ios #572

cels opened this issue Dec 8, 2020 · 5 comments
Labels
Cloud Messaging Related to Firebase FCM / Push Notifications / APNS feature request New feature request ios relates to iOS platform

Comments

@cels
Copy link

cels commented Dec 8, 2020

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#L294

Unfortunately 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! :-)

@maximilianloy
Copy link

We would like to get this feature implemented soon and would finance the development!

@stale
Copy link

stale bot commented May 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 12, 2021
@cels
Copy link
Author

cels commented May 18, 2021

Anything new on this topic?

@stale stale bot removed the wontfix label May 18, 2021
@dpa99c dpa99c added Cloud Messaging Related to Firebase FCM / Push Notifications / APNS feature request New feature request ios relates to iOS platform labels Jun 16, 2021
@ArnoutCreemers
Copy link

I have opened PR #693 which adds support to request critical alert permissions on iOS.

dpa99c added a commit that referenced this issue Jan 26, 2022
Feature #572: Implement authorization request for critical alerts on iOS
@cels
Copy link
Author

cels commented Feb 10, 2022

Looks like this is done.
Thank you very much @ArnoutCreemers and @dpa99c! 🥳

@cels cels closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cloud Messaging Related to Firebase FCM / Push Notifications / APNS feature request New feature request ios relates to iOS platform
Projects
None yet
Development

No branches or pull requests

4 participants