diff --git a/Sources/ImageIOSwiftUI/Derived.swift b/Sources/ImageIOSwiftUI/Derived.swift index 72160e2..56d80a8 100644 --- a/Sources/ImageIOSwiftUI/Derived.swift +++ b/Sources/ImageIOSwiftUI/Derived.swift @@ -1,3 +1,4 @@ +#if canImport(SwiftUI) && canImport(Combine) import Combine import SwiftUI @@ -111,3 +112,4 @@ extension Derived.Lazy: ErasedObservableObject where Derived: ObservableObject { .eraseToAnyPublisher() } } +#endif diff --git a/Sources/ImageIOSwiftUI/ImageSourceView.swift b/Sources/ImageIOSwiftUI/ImageSourceView.swift index 615cf34..244f510 100644 --- a/Sources/ImageIOSwiftUI/ImageSourceView.swift +++ b/Sources/ImageIOSwiftUI/ImageSourceView.swift @@ -1,3 +1,4 @@ +#if canImport(SwiftUI) && canImport(Combine) import ImageIOSwift import SwiftUI @@ -77,3 +78,4 @@ public struct ImageSourceView: View { } } } +#endif diff --git a/Sources/ImageIOSwiftUI/StaticImageSourceView.swift b/Sources/ImageIOSwiftUI/StaticImageSourceView.swift index 175b516..a420442 100644 --- a/Sources/ImageIOSwiftUI/StaticImageSourceView.swift +++ b/Sources/ImageIOSwiftUI/StaticImageSourceView.swift @@ -1,3 +1,4 @@ +#if canImport(SwiftUI) && canImport(Combine) import ImageIOSwift import SwiftUI @@ -107,3 +108,4 @@ public struct StaticImageSourceView: View { ) } } +#endif diff --git a/Sources/ImageIOSwiftUI/URLImageSourceView.swift b/Sources/ImageIOSwiftUI/URLImageSourceView.swift index d3ec072..90f699b 100644 --- a/Sources/ImageIOSwiftUI/URLImageSourceView.swift +++ b/Sources/ImageIOSwiftUI/URLImageSourceView.swift @@ -1,3 +1,4 @@ +#if canImport(SwiftUI) && canImport(Combine) import Combine import ImageIOSwift import SwiftUI @@ -108,3 +109,4 @@ public struct URLImageSourceView: View { } } } +#endif