file_picker_darwin 1.1.0
file_picker_darwin: ^1.1.0 copied to clipboard
Darwin (iOS and macOS) implementation of the file_picker plugin, supporting native file picking, saving, and directory selection.
1.1.0 #
- Implemented
PlatformFile.lengthSync(), returning the length iOS/macOS already reports for a picked file synchronously, without doing any I/O.
1.0.4 #
skipEntitlementsChecks()now overrides the newFilePickerPlatform.skipEntitlementsChecks()hook instead of being called through a type test onFilePickerPlatform.instance. No behavior change on iOS or macOS.- Added
DarwinOptions.assetRepresentationModesupport on iOS, mapped toPHPickerConfiguration.preferredAssetRepresentationMode. Requestingcurrentorcompatiblelets large HEVC, HDR, or slow-motion videos skip the transcodingautomatic(the default) would otherwise require. Non-automatic modes requirecompressionQualityto be0.
1.0.3 #
- Fixed a regression where
PrivacyInfo.xcprivacywas never being bundled by Swift Package Manager, because SwiftPM resolves resource paths relative to the target's own directory. #2175
1.0.2 #
- Fixed a crash (
FileSystemException/OSError: Is a directory) when picking a Live Photo from the iOS gallery. Live Photos are saved by iOS as.pvtpackages (directories), whichloadFileRepresentation(forTypeIdentifier: UTType.item...)returned as-is; the still image contained in the package is now extracted instead. - Fixed
getDirectoryPath,pickFiles,pickFileAndDirectoryPaths, andsaveFileon macOS defaulting to the sandbox container'sDatafolder instead of the user's real home directory when noinitialDirectoryis provided and the app has App Sandbox enabled. - Fixed the Save dialog on macOS auto-selecting the file extension along with the rest of the file name, making it easy to accidentally delete the extension when renaming. The extension is now hidden by default via
NSSavePanel.isExtensionHidden. - Fixed bundle-like directories (e.g.
.app,.fcpbundle) not being selectable as files on macOS file pickers, a regression since 8.2.0.NSOpenPanel.treatsFilePackagesAsDirectoriesis now explicitly set tofalseso these are presented as selectable files, matching Finder and other native apps. - Fixed
saveFileon macOS never enforcing an extension on the destination file when the user cleared it from the suggested name.allowedExtensionsis not forwarded tosaveFileyet, so the dialog now falls back to the extension of the suggested file name. - Fixed
saveFilereturning a scheme-less, percent-encodedUrion macOS instead of a properfile://Uri, unlike Windows and Linux. - Added
FilePickerDarwin.skipEntitlementsChecks(), letting non-sandboxed macOS apps opt out of the App Sandbox entitlement checks performed before showing a dialog. This was previously only reachable through a deprecated, no-op method onFilePickerin the root package. - Fixed a brief UI freeze on macOS right when calling
pickFiles,pickFileAndDirectoryPaths,getDirectoryPath, orsaveFile. The entitlement check now runs on a background queue before the dialog is created, instead of blocking the main thread synchronously.
1.0.1 #
- Fixed
pickFileAndDirectoryPathsnever returning directories on iOS and macOS. It now calls the native combined file and directory picker instead of silently falling back to file only selection. - Fixed
MissingPluginExceptionon macOS by registering the event channel stream handler. - Fixed method channel handling on macOS to support all file types and actions (
any,image,video,audio,media,custom,dir,save). - Fixed
saveFileon macOS not writing the provided filebytesto the chosen location. - Added safe argument unwrapping in macOS handler to prevent runtime crashes when arguments are null.
- Added native
UTTypefile type filtering for macOS file dialogs. - Improved package description, added example, and added missing API documentation.
1.0.0 #
- Initial release of iOS and macOS implementation package for
file_picker.