Skip to content

v3.10.0

Choose a tag to compare

@AlexV525 AlexV525 released this 09 Jul 11:19
· 14 commits to main since this release
b7aec2c

What's Changed

Features

  • Add an optional type parameter to AssetPathEntity.getAssetListPaged and AssetPathEntity.getAssetListRange so callers can filter to a specific RequestType within a single album (e.g. read videos out of a common album) without constructing a new AssetPathEntity. Defaults to the album's own type when omitted.
  • Add Darwin (iOS/macOS) only namespaced accessors AssetEntity.darwin and AssetPathEntity.darwin that group PhotoKit-specific reads without bloating the shared entity classes:
    • asset.darwin.cloudIdentifier and the batch PhotoManager.plugin.getCloudIdentifiers resolve stable cross-device cloud identifiers (iOS 15+/macOS 12+).
    • asset.darwin.hasAdjustments reports whether an asset has edits, and asset.darwin.getBaseFile() exports the unedited base file.
    • asset.darwin.getAdjustmentData() exports the raw AAE adjustment (edit-history) data backing an asset's edits, so callers can access the original resource, the edit metadata, and the rendered result separately (non-destructive editing).
    • path.darwin.getParentPathList() returns the parent folders containing an album or folder.
  • Add updateCreationDate to PhotoManager.editor.darwin and PhotoManager.editor.android for modifying an asset's creation date after it has been saved.
    • On iOS/macOS: updates the PHAsset.creationDate property.
    • On Android Q (API 29)+: updates the MediaStore DATE_TAKEN field; unsupported on API 28 and below.
  • Add PhotoManager.canManageMedia() and PhotoManager.requestManageMedia() for the Android 12 (API 31+) MANAGE_MEDIA special permission.

Improvements

  • Migrate the Android plugin to Flutter's built-in Kotlin integration with a compatibility fallback for projects that still require kotlin-android, without changing the package's public Flutter or Dart version constraints.
  • Fix the Android plugin namespace to com.fluttercandies.photo_manager so it matches the plugin package and Kotlin sources.

Fixes

  • Fix Android PlatformExceptions from IllegalArgumentException: Volume external_primary not found by returning an empty cursor when MediaProvider reports the primary volume as unavailable, and guard the media-store ContentObserver against the same exception.
  • Fix Darwin AssetEntity.originFile returning the locally-downsampled proxy for iCloud + "Optimize iPhone Storage"-affected photos by preferring PHImageManager with HighQualityFormat over writeDataForAssetResource on unedited raster primaries.
  • Fix Darwin PhotoManager.editor.darwin.saveLivePhoto returning PHPhotosErrorDomain (-1) when the caller-supplied image and video lacked the shared Live Photo pairing identifier PHAssetCreationRequest requires.
  • Fix iOS 18+ raising Unsupported fetch for asset collections with type 2 and subtype 2 when navigating into the primary album, caused by an invalid SmartAlbum + AlbumRegular combination in the recent-collection check.
  • Fix Darwin AssetEntity.loadFile / originFile sporadically failing with PHPhotosErrorDomain (-1) for edited assets and Live Photos by walking multiple PHAssetResource candidates and falling back to PHImageManager for plain videos/images when writeDataForAssetResource exhausts them.
  • Reduce built-in Kotlin migration warnings for supported project configurations while preserving legacy Flutter compatibility.
  • Fix Darwin crashes when querying assets by local identifier by catching PhotoKit exceptions and returning safe fallback results instead of aborting the process.
  • Fix the AssetEntity.duration API docs to clarify that audio and video durations are returned in seconds across supported platforms, preserving the existing API behavior.
  • Fix Android 14+ limited permission photo selection not reflecting deselection in Flutter layer. When users modify their photo selection via presentLimited(), the changes are now properly notified to the Flutter layer.
  • Fix delayed native deletion confirmation dialogs on iOS by elevating the dispatch queue priority of deleteWithIds, removeInAlbum, and deleteAlbum to QOS_CLASS_USER_INITIATED.
  • Fix Android 14+ permission requests incorrectly short-circuiting when only part of the requested media access was already granted.
  • Fix Android permission requests always asking for both image and video access regardless of RequestType. The plugin now only requests READ_MEDIA_IMAGES / READ_MEDIA_VIDEO matching the caller's RequestType, so the Android 14+ system photo picker only shows the media types the app actually asked for.
  • Fix Darwin video durations being truncated instead of rounded, so AssetEntity.duration matches the system album display more closely.
  • Fix Darwin getTitleAsync returning a null channel result by falling back to an empty string.
  • Fix Darwin Live Photo exports with an explicit darwinFileType, restoring iOS conversions such as Live Photo MOV-to-MP4 output.
  • Fix Darwin image loadFile(isOrigin: false) blocking the iOS UI thread by making the request asynchronous and moving JPEG file conversion off the main thread, allowing PMProgressHandler updates to arrive while loading.
  • Fix presentLimited() on iOS resolving the presenting view controller through the deprecated UIApplication.keyWindow, which can return the wrong window (or none) once an app adopts the UIScene life cycle. The plugin now prefers the FlutterViewController attached to its own engine and falls back to scanning the foreground-active UIWindowScene for the key window.
  • Fix latitude/longitude/latLng being dropped whenever a coordinate component was exactly 0.0 (e.g. assets near the equator or prime meridian). Dart, Android, and iOS/macOS all used 0.0 as a "no location" sentinel; 0.0 is now treated as a valid coordinate, and the native platforms report the absence of location data as an explicit null instead.
  • Replace the internal CC_MD5-based hash used to derive Darwin full-image cache filenames from PHAsset.localIdentifier with CC_SHA256, silencing the macOS 10.15+ deprecation warnings from CommonCrypto without changing observable behavior. Existing cached files under the plugin cache directory are re-created on first access after upgrade.