Vanethos / flutter_notification_permissions

Plugin for Flutter to check and ask for Notification Permissions
BSD 2-Clause "Simplified" License
81 stars 75 forks source link

iOS - getNotificationPermissionStatus() never returns #27

Closed DuncanKelbie closed 4 years ago

DuncanKelbie commented 4 years ago

On iOS if authorizationStatus value is provisional then the call to getNotificationPermissionStatus() never returns and my app is stuck waiting forever. Ideally I would like the PermissionStatus enum to be extended to include provisional so I can run different logic in that scenario.

It would be great if getNotificationPermissionStatus() always returns even if iOS adds more possible authorizationStatus values in future so that my app does not get stuck waiting forever.

praveenbbhati commented 4 years ago

Hi @DuncanKelbie

I've tested the app after the updated version.

When I check for permission status it returns PermissionStatus.provisional and when I request for permission app doesn't show any popup and returns PermissionStatus.unknown. I've tested on a simulator.

@Vanethos Do you know about this issue? or it does not work on the simulator.

DuncanKelbie commented 4 years ago

@praveenbbhati You're right, if the current status is PermissionStatus.provisional then no popup is shown when you request permission. This will happen whether on simulator or device. Needs fixing and thanks for pointing that out

DuncanKelbie commented 4 years ago

Created a new issue #29

DuncanKelbie commented 4 years ago

@Vanethos @praveenbbhati Created pull request #30