Skip to content

Modernized for SwiftPM and iOS 17

Latest

Choose a tag to compare

@ArtSabintsev ArtSabintsev released this 05 Jul 21:51
fefd13f

Breaking

  • Minimum deployment target raised to iOS 17 / tvOS 17 / watchOS 10 (previously iOS 11 / tvOS 11 / watchOS 9). Requires Swift 5.9+ / Xcode 15+ to build.
  • CocoaPods support removed. Zephyr.podspec is gone; Swift Package Manager is now the only supported installation method.

Fixed

  • Zephyr.setUserDefaultsSuite(to:) now migrates all registered KVO observers to the new suite on the internal sync queue. Previously the suite was swapped without re-registering observers, so changes in the new suite were never monitored.
  • Cloud-to-local syncs now write all values on the main queue and re-register observers on the sync queue only after the writes complete, closing a race where a KVO callback could fire mid-sync and echo stale values back to iCloud.
  • .keysDidChangeOnCloud is now posted once per cloud sync, after the local writes finish, instead of firing per-key and again at the end.
  • observeValue(forKeyPath:) checks the monitored-key set on the sync queue rather than the caller's thread, and registerObserver(key:) refuses keys that are not currently monitored, so stale observers can no longer trigger syncs for unmonitored keys.
  • sync(keys: []) with an empty array now falls back to a full sync, matching the documented behavior of the variadic overload.

Housekeeping

  • Removed #available checks made obsolete by the new deployment targets.
  • Removed the CocoaPods/bundler toolchain (Gemfile, Gemfile.lock, .bundle).
  • README updated for Swift 5.9, the new platform minimums, and SPM-only installation.

See #73 for full details.