Releases: Kosikowski/swift-bookmarks
Releases · Kosikowski/swift-bookmarks
Release list
0.2.1
Removes the library's only statfs call, so an app using it can describe the library accurately in its privacy manifest. See CHANGELOG.md for the full entry.
Changed
ItemInspecting.itemExists(withIdentity:)reads the volume's filesystem ID withgetattrlist(ATTR_CMN_FSID) instead ofstatfs. Apple listsstatfsamong the disk-space APIs a privacy manifest has to give a reason for, and none of that category's reasons covers reading a filesystem ID.getattrlistis a file timestamp API, the categoryitemExists(atPath:)'slstatalready needs, so an app declares one category for both.- The README has a "Privacy manifest" section listing the two categories an app declares for the library (file timestamps,
3B52.1; user defaults,CA92.1or1C8F.1), and its installation snippet points at 0.2.1.
Compatibility
- No API change. On macOS,
itemExists(withIdentity:)returns the same answers; ifgetattrlistcan't read the volume it returnsnil(can't tell), as a failedstatfsdid.
0.2.0
Closes the gaps found while adopting swift-bookmarks in an app. See CHANGELOG.md for the full list.
Added
- Document history store: path-only records (
add(pathOnly:key:metadata:)),lastUsedAtand pinning, eviction policies (.storeOrder,.leastRecentlyUsed,.goneFirst, custom), anevictions()stream,updateLastKnownPath(_:to:),forget(where:)and a synchronoussnapshot. - One-shot grant access:
beginAccess(to:)andwithAccess(to:_:)use a granted item without making a bookmark. - Document-scoped bookmarks and atomic saves:
DocumentBookmarks.replaceDocument(_:)andreplaceDocument(with:)replace the anchor while keeping the key the bookmarks need. - Re-granting off the Mac:
regrantWithDocumentPicker(UIKit) and thebookmarkRegrantSwiftUI modifier on every platform;bookmarkImporterhonours its configuration and reportsonCancel. - BookmarksTesting:
FakeBookmarkEnginesimulates the host platform by default, andclearScriptedFailures(of:)removes scripted failures.
Fixed
- In the App Sandbox a bookmark to a deleted item fails with 259; with nothing at the recorded path it is now
.missing, not.needsRegrant. times: 0in failure scripts no longer fails once.
Compatibility
BookmarkRecord.datais now optional (nilfor a path-only record), which breaks code that reads it.ItemInspectinggainsitemExists(withIdentity:), with a default implementation.FakeBookmarkEngine()now simulates iOS, visionOS or Catalyst on those hosts.
0.1.0
First release of swift-bookmarks: URL bookmarks and security-scoped access for macOS 15, Mac Catalyst 18, iOS 18 and visionOS 2, in Swift 6.
Products
- Bookmarks: every bookmark kind (app-scoped, document-scoped, implicit, reference, alias), typed failures, stale refresh inside the open scope, access leases that balance themselves, and an actor-based
BookmarkStorewith pluggable persistence (in memory,UserDefaults, a JSON file that can be shared between processes). - BookmarksUI: open panel and document picker, SwiftUI importer and drop destination, and a re-grant flow.
- BookmarksTesting:
FakeBookmarkEnginewith a simulated file system, sandbox rules and access accounting, andScriptedPersistencefor storage failures.
Notes
- This is a 0.x release: the API may still change before 1.0.
swift testruns outside the App Sandbox. TheIntegrationHostapp checks sandbox behaviour and is run by hand.- See the README for usage and
docs/design.mdfor the design.