3.0.0
AppState 3.0.0
Swift 6 library release built around Apple's Observation framework, with first-class SwiftData support and cross-platform Observation delivery.
Highlights
- Observation-based —
Applicationuses@Observable. Setters callnotifyChange()directly on all platforms (no Apple-only Combine cache bridge).withObservationTrackingworks without SwiftUI on Apple, Linux, and Windows. - Swift 6 — language mode
.v6,ExistentialAny, CI warnings-as-errors (APPSTATE_STRICT). - Platform floors — iOS 17 / macOS 14 / tvOS 17 / watchOS 10 / visionOS 1. Linux & Windows for the non-Apple feature set. WebAssembly unblocked via
canImportguards. - SwiftData (optional) —
ModelState/@ModelStatewith sharedModelContainerdependency; lenient mutators plus a throwingstrictfacade. - Correctness fixes — SyncState encodes before local fallback commit; Keychain is checked-
Sendablewith hardened locking.
Dependencies
- Requires Cache 2.1.3+ (WASM
canImport(Combine)+ Linux collection-cast fix).
Migrating from 2.x
See the Upgrade to 3.0 guide.
.package(url: "https://github.com/0xLeif/AppState.git", from: "3.0.0")Apple-only surfaces
Keychain (SecureState), iCloud (SyncState), and SwiftData (ModelState) remain Apple-platform features.
Verification
- macOS / Ubuntu / Windows / DocC CI green on
main CrossPlatformObservationTestspass on Linux CI