icloud_storage_plus 1.2.0
icloud_storage_plus: ^1.2.0 copied to clipboard
Flutter plugin for iCloud document storage that syncs across devices with safe file operations and Files app integration.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.2.0 - 2026-03-09 #
Added #
listContents()API for immediately-consistent container listings usingFileManager.contentsOfDirectorywith URL resource values. Unlikegather()(which reads the Spotlight metadata index),listContents()reflects filesystem mutations (rename, delete, copy) immediately.ContainerItemmodel withrelativePath,downloadStatus,isDownloading,isUploaded,isUploading,hasUnresolvedConflicts,isDirectory, and a convenienceisDownloadedgetter.- iCloud placeholder file resolution: both iOS (
.originalName.icloudstubs) and macOS Sonoma+ (APFS dataless files) are handled transparently —listContentsreturns the real filename and accurate download status. - Hidden file filtering:
listContentssuppresses system files (.DS_Store,.Trash, etc.) by filtering entries whose resolved name starts with..
Changed #
ICloudFiledartdoc now cross-referencesContainerItemand explains the eventual-consistency distinction.GatherResultdartdoc expanded to describeinvalidEntriespurpose.- Fixed typo in
InvalidArgumentExceptiondoc comment ("ued" → "used"). - README expanded with
listContentsdocumentation,gathervslistContentscomparison table, iCloud placeholder files section, andContainerItemmodel reference.
1.1.1 - 2026-02-14 #
Fixed #
- GitHub Actions automated publishing trigger for tags like
1.2.3(novprefix). - Remove example ephemeral LLDB helper files that were causing
dart pub publishvalidation warnings.
1.1.0 - 2026-02-13 #
Added #
- Swift Package Manager support for iOS and macOS (Flutter 3.24+ opt-in).
Changed #
- Native iOS/macOS sources are now packaged under
Sources/icloud_storage_plus/for SwiftPM compatibility (CocoaPods support remains via the podspecs). - Example apps now use Flutter's SwiftPM plugin integration (no CocoaPods
Podfiles in the example projects).
1.0.1 - 2026-02-11 #
Fixed #
- Avoid reading
NSMetadataItemoff the query thread by runningNSMetadataQueryon a dedicated operation queue and disabling updates during snapshot reads. - Ensure
relativePathgeneration is path-boundary-aware (avoid prefix-collision edge cases).
Changed #
- Clarify benchmark documentation around
standardizedFileURLbehavior.
1.0.0 - 2026-02-04 #
Major API update with path-based transfers for large files, coordinated in-place read/write APIs for small files, and a documentation overhaul.
BREAKING CHANGES #
Transfer API: file-path based for large files
Byte-based transfer APIs have been removed in favor of file-path methods. Large file content is no longer sent over platform channels.
Removed: upload(), download(), and related byte/JSON helpers.
New: uploadFile() and downloadFile() using local paths plus
cloudRelativePath.
Migration:
- Write data to a local file in Dart.
- Call
uploadFile(localPath, cloudRelativePath). - To read, call
downloadFile(cloudRelativePath, localPath)and read the local file in Dart.
gather() now returns GatherResult
gather() now returns a GatherResult containing:
files: parsedICloudFileentriesinvalidEntries: entries that could not be parsed (helps debug malformed metadata payloads)
ICloudFile metadata shape and nullability
ICloudFile now:
- includes
isDirectory: bool(directories are returned by metadata APIs) - may return
nullfor some fields when iCloud metadata is unavailable or the entry represents a directory (for examplesizeInBytes)
Directory detection behavior
documentExists() and getMetadata() return true/non-null for both files and
directories. Filter directories explicitly if your code expects only files.
Platform requirements updated
Minimum deployment targets match Flutter 3.10+:
- iOS: 13.0
- macOS: 10.15
Internal channel name change
The native method channel name is icloud_storage_plus (was icloud_storage).
Linting package change
Dev linting moved to very_good_analysis.
Added #
- File-path transfer methods:
uploadFile()(local → iCloud container)downloadFile()(iCloud container → local)
- Coordinated in-place access for small files:
readInPlace()/writeInPlace()(String, UTF-8)readInPlaceBytes()/writeInPlaceBytes()(Uint8List)- Optional
idleTimeouts+retryBackoffto control download watchdog/retry behavior; stalled downloads surfaceE_TIMEOUT.
- Convenience
rename()API (implemented in Dart viamove()). - Additional iCloud sync-state fields on
ICloudFile:downloadStatus,isDownloadingisUploading,isUploadedhasUnresolvedConflicts
- New public error code constants:
PlatformExceptionCode.initializationError(E_INIT)PlatformExceptionCode.timeout(E_TIMEOUT)
- Documentation overhaul:
- README updated to match the real API surface and semantics
- DeepWiki badge added to the README
- DeepWiki exported into
doc/for GitHub navigation - Added
scripts/fix_deepwiki_links.pyto keep exported docs linkable - Old
doc/research/plans removed (replaced by short notes underdoc/notes/)
Changed #
- Structural operations (
delete,move,copy) use coordinated file URL operations (NSFileCoordinator) rather than relying on metadata queries. - Existence and metadata (
documentExists,getDocumentMetadata) use direct filesystem checks (FileManager / URL resource values) rather than metadata queries. documentExists()is a filesystem existence check; it does not force a download. Usegather()for a remote-aware view of container contents.- Transfer progress streams deliver failures as
ICloudTransferProgressType.errordata events (not streamonError).
Fixed #
gather()now verifies the event channel handler exists before registering query observers (prevents leaked observers on early-return).getDocumentMetadata()now serializes download status keys as strings (.rawValue) for correct transport to Dart.- Dart relative-path validation accepts trailing slashes so directory paths from
metadata can be reused directly in operations like
delete(),move(),rename(), etc. uploadFile()/downloadFile()rejectcloudRelativePathvalues that end with/(directory-style paths).- macOS streaming writes use
.saveOperationfor existing files to avoid unintended “Save As” behavior.
Migration Guide (2.x → 1.0.0) #
- Replace byte-based reads/writes with local files +
uploadFile()/downloadFile(). - For small JSON/text stored in iCloud Drive, consider switching to in-place
access (
readInPlace/writeInPlace) for “transparent sync”. - Update call sites to handle directories via
ICloudFile.isDirectoryand add null checks for optional metadata fields. - If you use transfer progress, attach a listener immediately inside
onProgress(streams are listener-driven and may miss early events). - Run
flutter analyzeto address anyvery_good_analysislint findings.
Previous Releases #
For history prior to 1.0.0 (including the upstream lineage), see git history and the upstream repository: https://github.com/deansyd/icloud_storage