Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions Sources/Shared/API/HAAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import Version
#if os(iOS)
import Reachability
#endif
#if os(iOS) && !targetEnvironment(macCatalyst)
import ActivityKit
#endif

public class HomeAssistantAPI {
public enum APIError: Error, Equatable {
Expand Down Expand Up @@ -602,13 +599,6 @@ public class HomeAssistantAPI {

#if os(iOS) && !targetEnvironment(macCatalyst)
if #available(iOS 17.2, *) {
// Advertise Live Activity support so HA can send activity push tokens
// to the relay server. areActivitiesEnabled reflects the user's Settings
// toggle and returns true on both iPhone and iPad (iPadOS 17+).
appData["supports_live_activities"] = ActivityAuthorizationInfo().areActivitiesEnabled
appData["supports_live_activities_frequent_updates"] =
ActivityAuthorizationInfo().frequentPushesEnabled

// Push-to-start token (stored in Keychain at launch, updated via stream).
// The relay server uses this token to start a Live Activity entirely via APNs.
if let pushToStartToken = LiveActivityRegistry.storedPushToStartToken {
Expand Down
Loading