flutter_local_notifications
flutter_local_notifications copied to clipboard
[Request] Add option for provisional authorization (iOS/macOS)
As per the Apple documentation, rather than explicitly requesting authorization, we can use provisional authorization to send messages that the user can keep or turn off.
This just requires adding the .provisional
option to center.requestAuthorization
Could this be added?
Does the initialize
method need to be adjusted in cases where we don't always want to use the default authorization request, or can it simply not be called?
Could you submit a PR for it? Regarding initialize
, this could default to not requesting it. Note there's another API that is specific to iOS/macOS for requesting permissions
@MaikuB Can you mention the name of the API to request provisional permission.
Actually, I am using this plugin alongside firebase_messaging plugin. I am using following code in my main method to request provisional permission.
await FirebaseMessaging.instance.requestPermission( provisional: true, );
The firebase messaging plugin is working fine with provisional permission. But, i am not able to show notifications using this permission, granting notification permission.
Can you help me in understanding and resolving this issue. Thanks!