# CalendarrKit Shared code between Calendarr (iOS / Mac Catalyst) and other apps from the same developer team that want to **read** the user's calendar. `CalendarrCore` depends on Foundation only — no SwiftUI, no UIKit, no AppKit — so it compiles for iOS, Mac Catalyst and native macOS from one source. That constraint is load-bearing: `swift build` against the native macOS SDK is what catches a UIKit import before it reaches a consumer, because a Mac Catalyst build would compile it happily. ## What a reading app gets ```swift import CalendarrCore let store = SnapshotStore() // uses CalendarrAppGroup.current switch store.read() { case .ok(let snap): snap.events // [SnapshotEvent] snap.theme // the colours Calendarr is currently rendering with snap.writtenAt // "as of 14:32" snap.coverageStart // see "Coverage" below snap.coverageEnd case .neverWritten: // Calendarr has never run here → "open Calendarr once" case .loggedOut: // signed out → "sign in to Calendarr", discard old events case .incompatible: // Calendarr is newer than this package → "update the app" case .unreadable(let why): // almost always a wrong App Group; log `why` } store.readCalendars() // [SnapshotCalendar] for a filter UI ``` React to changes without polling: ```swift let token = SnapshotChangeNotifier.observe { /* hop to your actor, read again */ } // keep `token` alive; releasing it removes the observer ``` Also reload on window activation — the notification is a best-effort signal, and missing one should leave you slightly stale, never wrong. ## Coverage — the part that bites The snapshot is not the whole calendar. Outside `coverageStart..