-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[image_picker] Update for UIScene compatibility #10677
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
Conversation
Replaces the code that used the key window's root view controller with a call to the new registrar viewController method to get the actual Flutter content's view controller. Introduces the same protocol abstraction now used in a number of our plugins, so that a stub can be injected without having to mock (which would be a barrier to Swift migration) or fake (which is fragile since it would have to be complete, and methods can be added over time) the entire Flutter plugin registrar. Fixes flutter/flutter#174418
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.
Code Review
This pull request refactors the image_picker_ios plugin to improve UIScene compatibility by abstracting view controller access behind a FIPViewProvider protocol. This is a solid approach that also improves testability. The changes are mostly correct, but I've found a critical issue where many tests were not updated to use the new initializer, potentially masking issues and reducing test effectiveness. I've also included a couple of minor suggestions for improving code style and robustness.
...picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m
Show resolved
Hide resolved
packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.m
Show resolved
Hide resolved
...mage_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FIPViewProvider.m
Show resolved
Hide resolved
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.
LGTM with a question: #10677 (comment)
flutter/packages@d3f860d...9705815 2026-01-07 [email protected] [ci] setup flutter in batch release workflow (flutter/packages#10735) 2026-01-07 [email protected] [mustache_template] Improve error throwing (flutter/packages#10700) 2026-01-06 [email protected] [ci] Adjust workflow for dispatching go_router batch release (flutter/packages#10733) 2026-01-06 [email protected] [rfw] Remove scripting language integration section from `README` (flutter/packages#10726) 2026-01-06 [email protected] [image_picker] Update for UIScene compatibility (flutter/packages#10677) 2026-01-06 [email protected] [google_maps_flutter] Add iOS SDK 10.x support (flutter/packages#10720) 2026-01-06 [email protected] Update Google Fonts to v7.0.0 with new and removed fonts (flutter/packages#10713) 2026-01-06 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the kotlin-gradle-plugin group across 7 directories with 1 update (flutter/packages#10661) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@d3f860d...9705815 2026-01-07 [email protected] [ci] setup flutter in batch release workflow (flutter/packages#10735) 2026-01-07 [email protected] [mustache_template] Improve error throwing (flutter/packages#10700) 2026-01-06 [email protected] [ci] Adjust workflow for dispatching go_router batch release (flutter/packages#10733) 2026-01-06 [email protected] [rfw] Remove scripting language integration section from `README` (flutter/packages#10726) 2026-01-06 [email protected] [image_picker] Update for UIScene compatibility (flutter/packages#10677) 2026-01-06 [email protected] [google_maps_flutter] Add iOS SDK 10.x support (flutter/packages#10720) 2026-01-06 [email protected] Update Google Fonts to v7.0.0 with new and removed fonts (flutter/packages#10713) 2026-01-06 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the kotlin-gradle-plugin group across 7 directories with 1 update (flutter/packages#10661) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Replaces the code that used the key window's root view controller with a call to the new registrar viewController method to get the actual Flutter content's view controller.
Introduces the same protocol abstraction now used in a number of our plugins, so that a stub can be injected without having to mock (which would be a barrier to Swift migration) or fake (which is fragile since it would have to be complete, and methods can be added over time) the entire Flutter plugin registrar.
Fixes flutter/flutter#174418
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3