flutter-permission-handler
flutter-permission-handler copied to clipboard
[Bug]: CalendarFullAccess status is always denied in iOS 17+
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- [ ] Android
- [X] iOS
- [ ] Windows
Steps to reproduce
- Use
await Permission.calendarFullAccess.request();to get calendar permission. - Check
await Permission.calendarFullAccess.status;
Expected results
await Permission.calendarFullAccess.status; should return granted when permission is granted by user.
Actual results
await Permission.calendarFullAccess.status; returns denied.
The result is the same even if the user permanently denies the permission.
Code sample
Code sample
await Permission.calendarFullAccess.request();
// On next app run or on another page
final status = await Permission.calendarFullAccess.status;
if (status == PermissionStatus.permanentlyDenied) {
await openAppSettings();
} else {
await Permission.calendarFullAccess.request();
}
Screenshots or video
No response
Version
11.3.1
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4 23E214 darwin-arm64, locale en-IN)
• Flutter version 3.19.5 on channel stable at /Users/viplavrawal/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (2 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/viplavrawal/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.87.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.84.0
Hi @viplavrawal,
Are the required entries added to the ios/Podfile?
As per documentation (expand the iOS section) the PERMISSION_EVENTS_FULL_ACCESS has to be set to 1 to enable support for the calendarFullAccess permission.
Hi @mvanbeusekom
Yes. I added PERMISSION_EVENTS_FULL_ACCESS and later PERMISSION_EVENTS as well just to be sure.
The dialog for permission opens correctly and the permission is also granted. It's just that the status remains denied.
I have the same problem,added PERMISSION_EVENTS_FULL_ACCESS and PERMISSION_EVENTS ,Authorization popup does not pop
I also have the same issue.
Instead of saying "I have the same", which really doesn't help resolving the issue, try to provide more information about the bug.
An example app reproducing the behavior for example would be of great help.
I'm facing a similar problem but I'm using flutter as a static library because we already have a native iOS swift app.
I run the command: flutter build ios-framework --no-profile --no-debug --cocoapods --static
then link de frameworks.
The runs normally but the request popup does not appear.
When I use the only the flutter code running a example code (just use the command "flutter run"), the popup appears.
pdfile:
info.plist:
running order:
permission == Permission.calendarFullAccess
await permission.request().isGranted is true, but await permission.status.isGranted is false;
await Permission.calendarFullAccess.status; should return granted when permission is granted by user.
After restarting the app await Permission.calendarFullAccess.status.isGranted will become true