Baseflow / Baseflow/flutter-permission-handler

[Bug]: Notification permission status always returns Denied but was granted in request

Open
#1,497 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).
- [x] I have carefully [read the documentation](https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [ ] Android
- [x] iOS
- [ ] Windows

### Steps to reproduce

The issue only happened on iOS devices.

1. The permission request dialog is shown, and the permission is allowed. (Verified on iOS device that the permission is granted.)
Image

2. Calling `Permission.notification.status` or `Permission.notification.request()` both return Denied. The result is shown in the screenshot below.

Image

### Expected results

Must be "Granted" status if the permission was allowed.

### Actual results

Always returns Denied.

### Code sample

Code sample

```dart
final permissionStatus = await Permission.notification.request();
// or use
final permissionStatus = await Permission.notification.status;

print("=============== $permissionStatus");
```

### Screenshots or video

Screenshots or video demonstration

[Upload media here]

### Version

12.0.0+1 (also tried 12.0.1)

### Flutter Doctor output

Doctor output

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.2, on macOS 15.6.1 24G90 darwin-arm64
(Rosetta), locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.102.1)
[✓] Connected device (5 available)
! Error: Browsing on the local area network for Nauqhnim’s iPhone. Ensure
the device is unlocked and attached with a cable or associated with the
same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources

• No issues found!
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.