Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Calling saveImage method with add-only access on iOS triggers automatic photo library permission request #1243

Closed
HongZhiQing opened this issue Dec 9, 2024 · 2 comments

Comments

@HongZhiQing
Copy link

Version

3.6.3

Platforms

iOS

Device Model

IPhone 15 Pro max(ios 17.2)

flutter info

[✓] Flutter (Channel stable, 3.24.2, on macOS 15.0.1 24A348 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.24.2 on channel stable at /Users/Q/fvm/versions/3.24.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cf269e36d (3 months ago), 2024-09-03 14:30:00 -0700
    • Engine revision a6bd3f1de1
    • Dart version 3.5.2
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/Q/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • 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.15.2

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

[✓] Android Studio (version 2021.3)
    • 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 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.8)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 82.1.1
    • Dart plugin version 233.15325.11

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

How to reproduce?

///  Request to add-only
PhotoManager.requestPermissionExtend(requestOption: const PermissionRequestOption(
      iosAccessLevel: IosAccessLevel.addOnly,
));

/// Save imgae
AssetEntity? imageEntity = await PhotoManager.editor.saveImage(resultImage!.buffer.asUint8List(), filename: saveFileName);
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-12-09.at.205213.-.Compressed.with.FlexClip_compressed.mp4

Logs

No response

Example code (optional)

No response

Contact

No response

@fluttercandies-dev
Copy link

AI Summary: On iOS, calling saveImage with add-only access triggers an automatic photo library permission request, despite having already requested add-only permission.

@AlexV525
Copy link
Member

The example contains both permission privacy entries.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants