WatchModel
@MainActor
final class WatchModel : NSObject, ObservableObject, @preconcurrency WCSessionDelegate
This wraps the preferences in an observable wrapper.
-
The text report.
Declaration
Swift
@Published @MainActor var text: String { get set } -
The actual cleandate
Declaration
Swift
@Published @MainActor var cleanDate: Date { get set } -
Which screen to show
Declaration
Swift
@Published @MainActor var watchFormat: Int { get set } -
The task for rendering the text report
Declaration
Swift
@MainActor private var textTask: Task<Void, Never>? -
Tells the app to reload itself from the stored prefs. It does this in a separate thread, as rendering the keytags can take a while.
Declaration
Swift
@MainActor func reloadFromPrefs() -
Called when the app gets its context.
Declaration
Swift
@MainActor func session(_: WCSession, didReceiveApplicationContext inContext: [String : Any])Parameters
_Session. ignored
didReceiveApplicationContextthe app context
-
NOP
Declaration
Swift
@MainActor func session(_: WCSession, activationDidCompleteWith: WCSessionActivationState, error: (any Error)?)Parameters
_The session. ignored
activationDidCompleteWithignored
errorignored
View on GitHub