Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

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

Footnotes

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

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
Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link
Contributor

@vashworth vashworth left a 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)

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 6, 2026
@auto-submit auto-submit bot merged commit 40f248d into flutter:main Jan 6, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 7, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 7, 2026
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
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 7, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: image_picker platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[image_picker_ios][UIScene] Migrate to scene APIs

2 participants