Skip to content

Commit eec32c3

Browse files
committed
Added visionOS compability.
1 parent b6ea9bb commit eec32c3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Sources/SwiftUIExtension/Compability/WidgetConfigurationCompability.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import SwiftUI
2+
3+
#if canImport(WidgetKit)
24
import WidgetKit
35

46
@available(watchOS 9.0, macOS 11.0, *)
@@ -12,3 +14,5 @@ extension WidgetConfiguration {
1214
}
1315
}
1416
}
17+
#endif
18+

Sources/SwiftUIExtension/Compability/WidgetViewCompability.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import SwiftUI
2+
3+
#if canImport(WidgetKit)
24
import WidgetKit
35

46
extension View {
@@ -46,4 +48,6 @@ struct ContainerBackgroundForWidgetModifier<Background>: ViewModifier where Back
4648
}
4749
}
4850
}
49-
}
51+
}
52+
53+
#endif

0 commit comments

Comments
 (0)