Baseflow / Baseflow/flutter-permission-handler

[Bug]: When a user grants photos add only permission user cannot grant photos permission on iOS 17+

Open
#1,405 0 comments 2 reactions 1 assignee Claimed by @TimHoogstrate 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

1. Add permissions library to a Flutter app running on an iOS 17+ device
2. Add `"PERMISSION_PHOTOS=1",` line to the Podfile
3. Request photos only permission with `await Permission.photosAddOnly.request()`
4. Grant the permission
5. Request photos permission with `await Permission.photos.request()`. Select "Keep Add Only" in the dropdown.
6. Request the permission again `await Permission.photos.request()`. This time it returns permanently denied.
6. Open settings for the app and check the dropdown under `Photos`.

Only the "Add Photos Only" option is listed.

### Expected results

User is able to grant all photos permission in the app settings.

### Actual results

User is not able to grant all photos permission in the app settings.

### Code sample

Code

```
await Permission.photosAddOnly.request(); // allow
await Permission.photos.request(); // select add only
await Permission.photos.request(); // returns permanently denied
```

### Screenshots or video

Screenshots or video demonstration

![Simulator Screenshot - iPhone 15 Pro Max - 2024-11-15 at 10 56 39](https://github.com/user-attachments/assets/0bc225f8-6e3a-4f6a-8fe1-01187cd5def5)

### Version

11.3.1

### Flutter Doctor output

Doctor output

```console
[✓] Flutter (Channel stable, 3.24.4, on macOS 14.5 23F79 darwin-arm64, locale
en-US)
• Flutter version 3.24.4 on channel stable at
/Users/adamburnett/fvm/versions/3.24.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 603104015d (3 weeks ago), 2024-10-24 08:01:25 -0700
• Engine revision db49896cf2
• Dart version 3.5.4
• DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/adamburnett/Library/Android/sdk
• Platform android-35, build-tools 34.0.0
• Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.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 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.95.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.100.0

[✓] Connected device (6 available)
• SM S908U (mobile) • R5CT709BR8L • android-arm64 • Android 14 (API 34)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• iPhone 15 Pro Max (mobile) • 8BB01BB9-A21A-42F6-AF9C-809330A94B02 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5
(simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.69

[✓] Network resources
• All expected network resources are available.

• 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.