Releases: fabioknoedt/YCFirstTime
Releases · fabioknoedt/YCFirstTime
lastExecutionDate(forKey:) -> Date?
[2.1.0] — 2026-04-19
Added
lastExecutionDate(forKey:) -> Date?— read-only accessor for the timestamp
of a key's most recent successful execution. The library already stores this
for interval math; exposing it means apps that display "last asked N days
ago" don't need to track it twice.@objcselector:
-[YCFirstTime lastExecutionDateForKey:].
Swift porting
[2.0.0] — 2026-04-19
Swift rewrite. Public API and on-disk archive format are preserved, so
existing installs decode unchanged and Objective-C call sites keep working
against the same selectors.
Added
- Swift Package Manager support (
Package.swift, iOS 15, Swift 5 tools). - DocC catalog with a landing article organizing the public surface into
Topics groups — Swift Package Index auto-hosts this. ///documentation comments on every public symbol.Examples/directory with eight focused snippets (Swift + Objective-C).- XCTest suite that pins the public behavior and the persistence format, run
on every push via bothpod lib lintandswift test. - Testing seams on
YCFirstTime:versionProviderandnowProvider
closures, plus a publicinit()for constructing isolated instances. @unchecked Sendableon the library types for Swift 6 compatibility.
Changed
- Core implementation ported from Objective-C to Swift; the library is now a
single-language Swift module. UserDefaultskey,sharedGroupconstant,YCFirstTimeObjectclass name,
and thelastVersion/lastTimecoder keys are preserved — archives
written by 1.x versions decode unchanged.- README restructured for scannability, added SPM install instructions,
persistence contract is now documented explicitly. - iOS deployment target: 15.0 (was already bumped in 1.2.0; restated
here for clarity).
Fixed
executeOncePerIntervalday math. The Obj-C version divided elapsed
seconds by84_600(typo) instead of86_400, so intervals were roughly
0.23% shorter than advertised. Now uses the correct86_400.reset()persistence. The Obj-C version removed the wrongUserDefaults
key ("sharedGroup"instead of"YCFirstTime"), so state appeared
reset in-memory but returned on next launch.reset()now clears the
archive on disk as well as in memory.
Removed
- Objective-C source files (
YCFirstTime.{h,m},Classes/YCFirstTimeObject.{h,m})
and the Obj-C testing category. .travis.yml— CI has been on GitHub Actions since 1.2.0.