Skip to content

Commit c6a6133

Browse files
rwarnerclaude
andcommitted
Wrap widget extension LiveActivity files with os(iOS) guard
HADynamicIslandView, HALockScreenView, and HALiveActivityConfiguration all import ActivityKit directly. Wrap each file in #if os(iOS) && !targetEnvironment(macCatalyst). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 297289e commit c6a6133

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Sources/Extensions/Widgets/LiveActivity/HADynamicIslandView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) && !targetEnvironment(macCatalyst)
12
import ActivityKit
23
import Shared
34
import SwiftUI
@@ -161,3 +162,4 @@ struct HAExpandedBottomView: View {
161162
return .haPrimary
162163
}
163164
}
165+
#endif

Sources/Extensions/Widgets/LiveActivity/HALiveActivityConfiguration.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) && !targetEnvironment(macCatalyst)
12
import ActivityKit
23
import Shared
34
import SwiftUI
@@ -21,3 +22,4 @@ struct HALiveActivityConfiguration: Widget {
2122
}
2223
}
2324
}
25+
#endif

Sources/Extensions/Widgets/LiveActivity/HALockScreenView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) && !targetEnvironment(macCatalyst)
12
import ActivityKit
23
import Shared
34
import SwiftUI
@@ -83,3 +84,4 @@ struct HALockScreenView: View {
8384
return .haPrimary
8485
}
8586
}
87+
#endif

0 commit comments

Comments
 (0)