fix: Incompatible with iOS 26.0 under flutter_image_compress_common#343
fix: Incompatible with iOS 26.0 under flutter_image_compress_common#343alpinnz wants to merge 4 commits intofluttercandies:mainfrom
Conversation
|
Hi, what is the minimum supported iOS SDK version for this new writing method? What is the minimum supported iOS device version? |
|
Hi. The new method is based on PHAsset, which has been available since iOS 8.0. That said, Flutter itself now requires iOS 11.0 as the minimum deployment target, so in practice the minimum supported iOS SDK and device version is 11.0. This update has also been tested to build and run fine on iOS 16+ (iOS 26.0 reference).
|
There was a problem hiding this comment.
Pull Request Overview
Migrates iOS metadata handling from the deprecated AssetsLibrary (ALAsset) APIs to the Photos (PHAsset) framework to resolve build issues on newer iOS versions. Also includes minor cleanup and comment updates.
- Replace ALAsset/ALAssetRepresentation usage with PHAsset and PHImageManager requests
- Remove ALAsset-based helper methods and add PHAsset-based equivalents
- Minor comment and spelling fixes
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m | Replaces ALAsset metadata extraction with PHImageManager-based extraction; adds PHAsset helpers. |
| packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h | Updates public API to PHAsset-based methods; removes ALAsset references; adjusts comments. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.h
Show resolved
Hide resolved
|
@alpinnz Sorry for the late review. Could you address the review produced above? You can also find relevant implementations in photo_manager regarding |
|
I’ve pushed new commits addressing the review:
Please take another look. Thanks 🙏 |
AlexV525
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the patch
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Outdated
Show resolved
Hide resolved
packages/flutter_image_compress/example/macos/Flutter/GeneratedPluginRegistrant.swift
Show resolved
Hide resolved
packages/flutter_image_compress_common/ios/Classes/SYPictureMetadata/SYMetadata.m
Outdated
Show resolved
Hide resolved
|
The review from Copilot still looks promising. Consider fixing them before getting merged. |
This PR fixes compatibility issues with iOS 26.0 in the
flutter_image_compress_commonpackage.Previously, certain APIs that were deprecated or removed in iOS 26.0 were still being used, causing build errors.
Changes include:
ALAssetandALAssetRepresentationwithPHAssetfrom the Photos framework.This update ensures that the package can now build successfully on iOS 26.0 without introducing breaking changes for older iOS versions.