flutter_critical_alert_permission_ios 0.1.0 copy "flutter_critical_alert_permission_ios: ^0.1.0" to clipboard
flutter_critical_alert_permission_ios: ^0.1.0 copied to clipboard

PlatformiOS

Request critical alerts on iOS directly from Dart code.

iOS Critical Alert Permission with Flutter #

Purpose of this plugin is to let you request the permission for critical alerts on iOS from your Flutter app.

What Are Critical Alerts #

Critical alerts are an iOS only feature introduced in iOS 12. This feature allows apps to send critical alerts (that can be seen as special notifications) to the user, even if Do Not Disturb is on or the phone is muted.

Prerequisites #

Not all apps can use this feature; it is necessary to first receive the respective entitlement from Apple. In order to receive such entitlement you need to submit a request (e.g. using this form) specifying the scope of your app, what kind of notifications will be sent as critical alerts, how frequent that will be and why the application needs this functionality.

NB: This process can also take a few months before being approved, having a version of the app on Testflight can speed up the process.

NB: As of 21/04/21 it looks like the entitlement is applicable to all apps belonging to the same Developer Account, rather than only to the app used to request the entitlement.

Once you have the entitlement, all you need to do is to generate a new provisioning profile including it and use it to sign/validate the app.

State of the plugin #

The plugin covers a very specific use case and it does that on purpose. At the moment, in case of missing entitlement, it will fallback to requesting the notification permission to the user.

Contributing #

The plugin is released with the MIT licence and you are welcome to contribute to this plugin.

Possible areas of improvement:

  • Handle edge cases in Swift code (in SwiftFlutterCriticalAlertPermissionIosPlugin)
  • Handle more scenarios in Dart code (e.g. permission already requested, permission denied, ignore if running on Android, etc.)
4
likes
120
pub points
68%
popularity

Publisher

unverified uploader

Request critical alerts on iOS directly from Dart code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_critical_alert_permission_ios