-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[image_picker] [PHPhotoLibrary authorizationStatus] status is not correct in iOS14+ #113681
Comments
Hi @zhouxing5311 |
sorry for that, it is in |
@zhouxing5311 DemoScreen.Recording.2022-10-20.at.10.02.09.movModified snippet code- (void)checkPhotoAuthorizationForAccessLevel API_AVAILABLE(ios(14)) {
PHAuthorizationStatus status = [PHPhotoLibrary authorizationStatusForAccessLevel:PHAccessLevelReadWrite]; Which iOS version did you try? |
maybe i did't make my point, image selecting behavior has no problem, the question is the reason I bring this up is that i want to show diffrent image select page when your permission is limitted by modifying the source code, so i need to get the correct authorizationStatus. maybe you will add the feature like this to source code? or when i finish this, i can submit a pull request. i think this is a better experience for user who selected the limited photos. the present behavior may confusing the user that the original image selecting is invalid. |
@zhouxing5311 Also, I re-test this thing again, looks like it has been implemented similar to what you're describing (although the Demo (Select more photos)Screen.Recording.2022-10-20.at.11.06.13.mov |
hi, i don't think this is a similar case, the handling for limit photos is not suitable i think. after selecting the special photos, next time the image picker should show the photos only which is selected by user at the begin time. or the previous selecting is useless, users can not understand what's meaning of the begining select. |
@zhouxing5311 Labeling the issue as a proposal for further insight from the team. Plugin: flutter doctor -v (stable and master)[✓] Flutter (Channel stable, 3.3.5, on macOS 12.6 21G115 darwin-x64, locale en-VN)
• Flutter version 3.3.5 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d9111f6402 (9 hours ago), 2022-10-19 12:27:13 -0700
• Engine revision 3ad69d7be3
• Dart version 2.18.2
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• 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 14.0.1)
• Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
• Build 14A400
• CocoaPods version 1.11.3
[✓] 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 Community Edition (version 2022.2.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 70.0.5
• Dart plugin version 222.4167.21
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
• IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.72.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.50.0
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 332079AF-E895-4685-910E-7B1E18B0C6B8 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 12.6 21G115 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 106.0.5249.119
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
[!] Flutter (Channel master, 3.5.0-10.0.pre.67, on macOS 12.6 21G115 darwin-x64, locale en-VN)
• Flutter version 3.5.0-10.0.pre.67 on channel master at /Users/huynq/Documents/GitHub/flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e62d519cb5 (18 minutes ago), 2022-10-24 21:56:13 -0400
• Engine revision 75bfcd73ca
• Dart version 2.19.0 (build 2.19.0-330.0.dev)
• DevTools version 2.18.0
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• 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 14.0.1)
• Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
• Build 14A400
• CocoaPods version 1.11.3
[✓] 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 Community Edition (version 2022.2.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 70.0.5
• Dart plugin version 222.4167.21
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
• IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.72.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.50.0
[✓] Connected device (3 available)
• SM T225 (mobile) • R9JT3004VRJ • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-x64 • macOS 12.6 21G115 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 106.0.5249.119
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
|
Most of the discussion above has been focused on the code, but without any context on what the behavior is, which makes it hard to understand what exactly is being reported. What is the developer and/or end-user impact of the code changes you are suggesting? |
hi, the behavior we wants to is this. image_picker will open this page when users used the limiting photo permission. i have finish this at my forked repo, you can see the changes. this is only a suggestion, the behavior now is ok too. |
Hi! We are facing this issue too. If the user only gives access to some of their photos, while picking photos all of them can be picked. It is not the expected behaviour. Only the selected photos should be shown while picking images.
|
i have changed some code in my forked repo to change the behavior. you can see the details in this change zhouxing5311/plugins@67f4eea if you want to test the new behavior, you can add the following override code in your
|
@csbence10 Your issue is probably a separate bug. IIRC It is because we used |
cc @vashworth |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
it is not correct using
[PHPhotoLibrary authorizationStatus]
to get the authorization status in iOS14+. such as when you limit your app can access only some photos, then[PHPhotoLibrary authorizationStatus]
will returnPHAuthorizationStatusAuthorized
which is not correct.to solve the problem, you should use
[PHPhotoLibrary authorizationStatusForAccessLevel:PHAccessLevelReadWrite]
in iOS14+ to get the correct result.The text was updated successfully, but these errors were encountered: