Skip to content

Commit eb20cb3

Browse files
committed
Exclude example widget from mac catalyst builds
Causes build errors due to ActivityKit not being available on mac catalyst.
1 parent a9a0dc7 commit eb20cb3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Created by Brian Smith on 5/29/24.
66
//
77

8+
#if !targetEnvironment(macCatalyst)
89
import WidgetKit
910
import SwiftUI
1011

@@ -14,3 +15,4 @@ struct ExampleWidgetBundle: WidgetBundle {
1415
ExampleWidgetLiveActivity()
1516
}
1617
}
18+
#endif

OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2024 The Chromium Authors. All rights reserved.
77
//
88

9+
#if !targetEnvironment(macCatalyst)
910
import ActivityKit
1011
import WidgetKit
1112
import SwiftUI
@@ -64,3 +65,4 @@ struct ExampleWidgetLiveActivity: Widget {
6465
}
6566
}
6667
}
68+
#endif

0 commit comments

Comments
 (0)