diff --git a/NucleicRemote/NucleicRemote/LiveActivityManager.swift b/NucleicRemote/NucleicRemote/LiveActivityManager.swift index 55838f1..dbe03f6 100644 --- a/NucleicRemote/NucleicRemote/LiveActivityManager.swift +++ b/NucleicRemote/NucleicRemote/LiveActivityManager.swift @@ -28,6 +28,14 @@ final class LiveActivityManager { private var pendingState: NucleicSessionAttributes.ContentState? private var updateTask: Task? + /// Set by `RemoteStore` to ship the activity's APNS push token to the paired Macs (and to tell + /// them it ended). The Macs use the token to keep this glance fresh over APNs while the phone + /// is backgrounded and its sync socket is suspended (UX_IOS ยง5.3). + var onPushToken: ((_ token: String, _ activityID: String) -> Void)? + var onActivityEnded: ((_ activityID: String) -> Void)? + /// Streams the activity's per-activity APNS update token (it can rotate); cancelled on end. + private var tokenObservation: Task? + /// Reconcile the Activity with the current session set. func sync(hostName: String, sessions: [WireSessionSummary]) { guard ActivityAuthorizationInfo().areActivitiesEnabled else { return }