-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[image_picker] optionally disable PHAsset & iOS permission request #3090
Conversation
[self checkPhotoAuthorization]; | ||
break; | ||
} | ||
[self showPhotoLibrary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may actually need a check for iOS 11 or higher
[self checkPhotoAuthorization]; | ||
break; | ||
} | ||
[self showPhotoLibrary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, this may need a check for iOS 11 or higher
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@cyanglaz Per flutter/flutter#65995 (comment), should I change |
Thanks for sending out this PR! I had a comment about this new flag here flutter/flutter#65995 (comment) The other changes would be pretty similar. Integration testing this might be a little tricky. I will work on a PR to add some tests for you. Meanwhile, could you add some unit tests for this change? |
@cpboyd I haven't started working on this yet, I'd like to help you land this PR :) Please feel free to ping me if you have any questions, I'd be happy to review once the tests are added. |
Oh, I didn't see this :) yes, please rename it to |
@cyanglaz It seems that since I modified my fork to be based off of the main repo (rather than another fork), it messed with GitHub's PR system. I'll close this and re-open with the new changes. |
Description
Make iOS 11+ permissions requests optional per https://developer.apple.com/forums/thread/653414.
PHAssets aren't actually required and there was already some fallback code in place.
To keep this as a non-breaking change, I added an optional parameter of
iosPhaAsset
with a default oftrue
.Setting this to false will disable any permissions checking on iOS and simply display the image picker.
I still need to update the tests.
Related Issues
Fixes flutter/flutter#65995
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?