Repository navigation
[image_picker_ios] Require Flutter 3.47 / iOS 15 and drop deprecated kUTType code paths - #13224
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the image_picker_ios package to replace references to the deprecated kUTTypeGIF constant with the literal string value "com.compuserve.gif" (and CFSTR("com.compuserve.gif")) for iOS versions older than 14.0. It also bumps the package version to 0.8.13+11 and updates the changelog. There are no review comments, and I have no feedback to provide.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
It doesn't need to though; if you set the minimum Flutter SDK to 3.47, which only supports 15+, then you can just remove all the deprecated code paths instead of hard-coding constants. That's just a bugfix change since the |
| gifTypeIdentifier = (NSString *)kUTTypeGIF; | ||
| // The value of kUTTypeGIF, which is deprecated as of iOS 15 and can no longer be referenced | ||
| // without a warning when the deployment target is 15 or later. | ||
| gifTypeIdentifier = @"com.compuserve.gif"; |
There was a problem hiding this comment.
If you don't want to change the min version, 84b71e5 is the standard way of dealing with depreciation warnings on fallback code paths.
There was a problem hiding this comment.
Went with raising the minimum: Flutter 3.47 dropped iOS 13 and 14, so those branches can't run on any Flutter this package will ship with from here on, and dropping them is what makes it compile on Xcode 27. The package now requires Flutter 3.47 / iOS 15 and the @available(iOS 14) branches are gone, so UTTypeGIF/UTTypeImage/UTTypeMovie are used directly. Left the remaining @available(iOS 13/14) checks in FLTImagePickerPlugin.m for the Swift rewrite in #13235 rather than conflict with it.
| #import <PhotosUI/PHPhotoLibrary+PhotosUISupport.h> | ||
| #import <PhotosUI/PhotosUI.h> | ||
| #import <UIKit/UIKit.h> | ||
| #import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> |
There was a problem hiding this comment.
This file is about to be converted to Swift with #13235.
The utils files in this PR should be converted in the next PRs on that Swift migration stack.
Heads up @victogomez-cs you're going to need to make a similar change to whatever lands here in your Swift PRs.
|
This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled. |
jmagman
left a comment
There was a problem hiding this comment.
LGTM once the pubspec merge conflict is fixed. Thanks!
Xcode 27 only supports deployment targets of iOS 15 and up, so the kUTType* constants (deprecated in iOS 15) now trip -Wdeprecated-declarations in the iOS 13 fallback branches and in FLTImagePickerPlugin.m, which makes the xcode analyze CI step fail. Use UTType on iOS 14+ and the constants' string values otherwise. Part of flutter/flutter#194019
392f5cd to
0f347f3
Compare
…kUTType code paths Xcode 27 only supports deployment targets of iOS 15 and up, so the kUTType* constants (deprecated in iOS 15) in the iOS 13 fallback branches and in FLTImagePickerPlugin.m trip -Wdeprecated-declarations and make the xcode analyze CI step fail. Flutter 3.47 dropped iOS 13 and 14, so raise the package's minimum to Flutter 3.47 / iOS 15 and delete those code paths instead of keeping them around; pub keeps clients on older Flutter on the previous version. Part of flutter/flutter#194019
|
Adding override: no versioning needed — the image_picker change is README‑only (support table), same as #10470. |
|
autosubmit label was removed for flutter/packages/13224, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Resolves conflicts with flutter#12267, flutter#13079, and flutter#13224: - Moves this change to 0.8.13+13, above main's 0.8.13+12 entry. - Keeps main's removal of the kUTTypeGIF fallback in the GIF writer and this change's NULL destination check. - Ports the two UIImagePickerController save-failure tests to the Swift plugin tests, using the PHImageManager seam instead of OCMock. - Replaces the undecodable-data PHPicker test, which flutter#12267 now rejects earlier, with one that reaches the save failure through maxWidth 0. - Drops the test bridging header, which main removed: the test subclass now replaces +temporaryFilePath: by selector, and the GIF destination test goes through the public save method.
Roll Packages from a1ed23c to da40eaf (33 revisions) flutter/packages@a1ed23c...da40eaf 2026-10-15 [email protected] [pigeon]add support for sealed classes in native interop (flutter/packages#13175) 2026-10-15 [email protected] [pigeon] Replace full JNI bindings with stubs for API classes that aren't needed (flutter/packages#13173) 2026-10-14 [email protected] [material_ui] Fix self-comparison and assert bugs in semantics_tester (flutter/packages#12722) 2026-10-14 [email protected] [camera_avfoundation] Replace the deprecated 'videoOrientation' with 'videoRotationAngle' on iOS 17+ (flutter/packages#13247) 2026-10-14 [email protected] [material_ui] Fix GridTile crash when the incoming constraints are unbounded (flutter/packages#12586) 2026-10-14 [email protected] [in_app_purchase_storekit] Remove unused and deprecated "SKDownload" hosted content (flutter/packages#13222) 2026-10-14 [email protected] [material_ui] Add supportingTextPadding to InputDecorator (flutter/packages#12769) 2026-10-14 [email protected] [vector_graphics_codec] Add support for encoding and decoding paint blur commands (flutter/packages#13148) 2026-10-14 [email protected] [go_router] Fix redirect zone async error handling (flutter/packages#12836) 2026-10-14 [email protected] Sync release-go_router-18.1.0 to main (flutter/packages#13260) 2026-10-14 [email protected] Sync release-cupertino_ui-1.1.3 to main (flutter/packages#13258) 2026-10-14 [email protected] [material_ui] add enableInlinePrediction parameter to TextFormField (flutter/packages#12793) 2026-10-14 [email protected] Sync release-material_ui-1.7.0 to main (flutter/packages#13259) 2026-10-14 [email protected] [material_ui] Add the Material shapes. (flutter/packages#12771) 2026-10-14 [email protected] [material_ui] Add tertiary tap callbacks to InkResponse and InkWell (flutter/packages#12676) 2026-10-14 [email protected] Roll Flutter from 4249ccb to 426be96 (44 revisions) (flutter/packages#13256) 2026-10-14 [email protected] [material_ui] fixes expanded state in the a11y_assessment home page dropdown (flutter/packages#13219) 2026-10-14 [email protected] [VPAT] Fix semantics in a11y_assessments drawer, radio, and rail demos (flutter/packages#13159) 2026-10-14 [email protected] [google_maps_flutter] Add onPointOfInterestTap (flutter/packages#11872) 2026-10-14 [email protected] [go_router] Fix shell route key collisions and dynamic branch updates (flutter/packages#12549) 2026-10-14 [email protected] Manual roll Flutter from d03768e to 4249ccb (158 revisions) (flutter/packages#13220) 2026-10-14 [email protected] [image_picker_ios] Require Flutter 3.47 / iOS 15 and drop deprecated kUTType code paths (flutter/packages#13224) 2026-10-13 [email protected] [in_app_purchase_storekit] Fixes Storekit 2 flaky tests (flutter/packages#13213) 2026-10-13 [email protected] [local_auth] Convert Android to new Pigeon suspend support (flutter/packages#12894) 2026-10-13 [email protected] [material_ui] Add enabled parameter to DropdownButtonFormField (flutter/packages#12610) 2026-10-13 [email protected] [go_router] Link ShellRoute docs to StatefulShellRoute (flutter/packages#13120) 2026-10-13 [email protected] FadeForwards page transition performance (flutter/packages#13161) 2026-10-13 [email protected] [in_app_purchase_android] Guard async billing callbacks against duplicate listener responses (flutter/packages#12640) 2026-10-13 [email protected] [google_sign_in] Remove the Objective-C exception catcher (flutter/packages#13156) 2026-10-13 [email protected] [camera_avfoundation] Remove availability checks below the package minimum iOS 13 (flutter/packages#13214) 2026-10-13 [email protected] [google_maps_flutter_ios] Remove iOS 14 availability check from example UI tests (flutter/packages#13218) 2026-10-13 [email protected] [google_sign_in] Convert implementation to Kotlin (flutter/packages#13005) 2026-10-13 [email protected] [image_picker_ios] PR 2/5 Add a PHImageManager image-data seam and migrate plugin native tests to Swift Testing (flutter/packages#13079) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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: ...
As of flutter/flutter#187741 the minimum is iOS 15. Check deprecation warnings for higher versions. Start with 16. #13224 and #13222 have landed. See previous bump at #7431 Fixes flutter/flutter#194245 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^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.
Checks in the iOS 15.0 deployment target for the example apps, so the tree matches what CI actually builds. Xcode 27 only accepts iOS deployment targets of 15.0 and up. The CI side of that — the `--ios-min-version` flag on the `xcode analyze deprecation` step, which was the actual failure in the issue — has already landed in #13211 (it went to 16.0), so that file is no longer part of this PR. What's left here is the example projects: 44 `example/ios/Runner.xcodeproj/project.pbxproj` files and the three remaining Podfiles still said 13.0 or 14.0. `flutter build ios` already rewrites these to 15.0 in place during `build examples` (the migration logs `Updating minimum iOS deployment target to 15.0.`), so CI was never building at 13.0; checking in the migrated values stops the files showing up as modified after a local build and makes the checked-in projects match Flutter's minimum. The stale "only supports back to iOS 14" comment in the google_maps_flutter example Podfile is replaced with the template's standard line. Plugin minimums (podspec / `Package.swift`) are not changed here; that is a per-package decision like #13224 made for image_picker_ios. Verified on Xcode 27 before #13211 landed, with this branch plus the Xcode 27 CI experiment config: shard 1 https://ci.chromium.org/b/8668096608488894433 and shards 2–5 https://ci.chromium.org/b/8668086846834062161, https://ci.chromium.org/b/8668086845504323249, https://ci.chromium.org/b/8668086844011129681, https://ci.chromium.org/b/8668086842838050321 — `build examples` no longer prints any migration lines and the analyze steps pass; the remaining `native test` failures in three of those are unrelated Xcode 27 issues (flutter/flutter#194284, flutter/flutter#194285). Part of flutter/flutter#194019 ## Pre-Review Checklist Version/CHANGELOG: CI configuration and unpublished example project files only; no package code or published files change, so no version bumps (same as #11227). Tests: CI config and project-file change only; no testable code. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^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.
Roll Packages from a1ed23c to da40eaf (33 revisions) flutter/packages@a1ed23c...da40eaf 2026-10-15 [email protected] [pigeon]add support for sealed classes in native interop (flutter/packages#13175) 2026-10-15 [email protected] [pigeon] Replace full JNI bindings with stubs for API classes that aren't needed (flutter/packages#13173) 2026-10-14 [email protected] [material_ui] Fix self-comparison and assert bugs in semantics_tester (flutter/packages#12722) 2026-10-14 [email protected] [camera_avfoundation] Replace the deprecated 'videoOrientation' with 'videoRotationAngle' on iOS 17+ (flutter/packages#13247) 2026-10-14 [email protected] [material_ui] Fix GridTile crash when the incoming constraints are unbounded (flutter/packages#12586) 2026-10-14 [email protected] [in_app_purchase_storekit] Remove unused and deprecated "SKDownload" hosted content (flutter/packages#13222) 2026-10-14 [email protected] [material_ui] Add supportingTextPadding to InputDecorator (flutter/packages#12769) 2026-10-14 [email protected] [vector_graphics_codec] Add support for encoding and decoding paint blur commands (flutter/packages#13148) 2026-10-14 [email protected] [go_router] Fix redirect zone async error handling (flutter/packages#12836) 2026-10-14 [email protected] Sync release-go_router-18.1.0 to main (flutter/packages#13260) 2026-10-14 [email protected] Sync release-cupertino_ui-1.1.3 to main (flutter/packages#13258) 2026-10-14 [email protected] [material_ui] add enableInlinePrediction parameter to TextFormField (flutter/packages#12793) 2026-10-14 [email protected] Sync release-material_ui-1.7.0 to main (flutter/packages#13259) 2026-10-14 [email protected] [material_ui] Add the Material shapes. (flutter/packages#12771) 2026-10-14 [email protected] [material_ui] Add tertiary tap callbacks to InkResponse and InkWell (flutter/packages#12676) 2026-10-14 [email protected] Roll Flutter from 4249ccb to 426be96 (44 revisions) (flutter/packages#13256) 2026-10-14 [email protected] [material_ui] fixes expanded state in the a11y_assessment home page dropdown (flutter/packages#13219) 2026-10-14 [email protected] [VPAT] Fix semantics in a11y_assessments drawer, radio, and rail demos (flutter/packages#13159) 2026-10-14 [email protected] [google_maps_flutter] Add onPointOfInterestTap (flutter/packages#11872) 2026-10-14 [email protected] [go_router] Fix shell route key collisions and dynamic branch updates (flutter/packages#12549) 2026-10-14 [email protected] Manual roll Flutter from d03768e to 4249ccb (158 revisions) (flutter/packages#13220) 2026-10-14 [email protected] [image_picker_ios] Require Flutter 3.47 / iOS 15 and drop deprecated kUTType code paths (flutter/packages#13224) 2026-10-13 [email protected] [in_app_purchase_storekit] Fixes Storekit 2 flaky tests (flutter/packages#13213) 2026-10-13 [email protected] [local_auth] Convert Android to new Pigeon suspend support (flutter/packages#12894) 2026-10-13 [email protected] [material_ui] Add enabled parameter to DropdownButtonFormField (flutter/packages#12610) 2026-10-13 [email protected] [go_router] Link ShellRoute docs to StatefulShellRoute (flutter/packages#13120) 2026-10-13 [email protected] FadeForwards page transition performance (flutter/packages#13161) 2026-10-13 [email protected] [in_app_purchase_android] Guard async billing callbacks against duplicate listener responses (flutter/packages#12640) 2026-10-13 [email protected] [google_sign_in] Remove the Objective-C exception catcher (flutter/packages#13156) 2026-10-13 [email protected] [camera_avfoundation] Remove availability checks below the package minimum iOS 13 (flutter/packages#13214) 2026-10-13 [email protected] [google_maps_flutter_ios] Remove iOS 14 availability check from example UI tests (flutter/packages#13218) 2026-10-13 [email protected] [google_sign_in] Convert implementation to Kotlin (flutter/packages#13005) 2026-10-13 [email protected] [image_picker_ios] PR 2/5 Add a PHImageManager image-data seam and migrate plugin native tests to Swift Testing (flutter/packages#13079) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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: ...
With Xcode 27 the
xcode analyzestep ofMac_arm64 ios_platform_testsfails on image_picker_ios:Staging run on Xcode 27 (27A266a): https://ci.chromium.org/b/8668491298933206513
kUTTypeGIFis only referenced in theelsebranch of anif (@available(iOS 14.0, *))check (added in #10848), so it never runs on iOS 14+. The compiler still has to compile that branch though, and Xcode 27 only supports deployment targets of iOS 15 and up, so the plugin is now always built with-target …-ios15.0and the reference trips-Wdeprecated-declarations, whichxcode analyzetreats as an error. The build stops at the first failing file;FLTImagePickerPhotoAssetUtil.mhas the same pattern, andFLTImagePickerPlugin.museskUTTypeImage/kUTTypeMovieunconditionally.Flutter 3.47 dropped iOS 13 and 14, so rather than keep those code paths alive this raises the package minimum to Flutter 3.47 / Dart 3.13 and iOS 15 (podspec and
Package.swift), and deletes the iOS 13 branches:UTTypeGIF,UTTypeImageandUTTypeMovieare used directly. Clients on older Flutter stay on the previous version throughpub, so this is a patch bump, same as #10231 did for iOS 13. The remaining@available(iOS 13/14, *)checks inFLTImagePickerPlugin.mare now dead too; I left them alone since that file is being rewritten in Swift in #13235 and they can go there.Also updates the app-facing
image_pickerREADME's support table to iOS 15 (with a## NEXTentry, no version bump), the same way #10470 did for iOS 13.Verified on Xcode 27 (with the earlier, fallback-preserving version of this change):
xcode analyze,xcode analyze deprecationand the native tests pass for image_picker_ios — https://ci.chromium.org/b/8668086845504323249 (shard 3 of a staging replay; the remainingnative testfailure in that build is in_app_purchase_storekit, flutter/flutter#194285).Part of flutter/flutter#194019
Pre-Review Checklist
[shared_preferences]///).Test exemption: native-only change with no behaviour change; the existing GIF tests in
RunnerTests/ImageUtilTests.swiftandRunnerTests/PhotoAssetUtilTests.swiftalready exercise both call sites.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