Skip to content

Commit cab8c9a

Browse files
committed
fix watchOS
1 parent b41e2dc commit cab8c9a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

SwiftDraw/Sources/CanvasUIView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// 3. This notice may not be removed or altered from any source distribution.
3030
//
3131

32-
#if canImport(UIKit)
32+
#if canImport(UIKit) && !os(watchOS)
3333
import UIKit
3434
import SwiftUI
3535

SwiftDraw/Sources/SVGView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ public struct SVGView: View {
9898
)
9999
}
100100
} else {
101+
#if !os(watchOS)
101102
CanvasFallbackView(
102103
svg: svg,
103104
capInsets: capInsets,
104105
resizingMode: resizingMode
105106
)
107+
#endif
106108
}
107109
}
108110
}
@@ -128,6 +130,8 @@ public extension GraphicsContext {
128130
}
129131
}
130132

133+
#if DEBUG
134+
131135
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
132136
#Preview {
133137
SVGView(svg: .circle)
@@ -139,7 +143,6 @@ public extension GraphicsContext {
139143
.resizable(resizingMode: .tile)
140144
}
141145

142-
#if DEBUG
143146
private extension SVG {
144147

145148
static var circle: SVG {

0 commit comments

Comments
 (0)