diff --git a/Sources/Extensions/PHLivePhotoView+Kingfisher.swift b/Sources/Extensions/PHLivePhotoView+Kingfisher.swift index 5e532946a..ae22398bb 100644 --- a/Sources/Extensions/PHLivePhotoView+Kingfisher.swift +++ b/Sources/Extensions/PHLivePhotoView+Kingfisher.swift @@ -24,6 +24,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if os(watchOS) +// Only a placeholder. +public struct RetrieveLivePhotoResult: @unchecked Sendable { +} +#else @preconcurrency import PhotosUI public struct RetrieveLivePhotoResult: @unchecked Sendable { @@ -193,3 +198,4 @@ extension KingfisherWrapper where Base: PHLivePhotoView { return .imageSettingError(reason: .notCurrentLivePhotoSourceTask(result: result, error: error, source: source)) } } +#endif diff --git a/Sources/General/Kingfisher.swift b/Sources/General/Kingfisher.swift index 53a91ddbb..b890d24b3 100644 --- a/Sources/General/Kingfisher.swift +++ b/Sources/General/Kingfisher.swift @@ -114,7 +114,7 @@ extension NSTextAttachment : KingfisherCompatible { } extension WKInterfaceImage : KingfisherCompatible { } #endif -#if canImport(PhotosUI) +#if canImport(PhotosUI) && !os(watchOS) import PhotosUI extension PHLivePhotoView : KingfisherCompatible { } #endif diff --git a/Sources/General/KingfisherManager+LivePhoto.swift b/Sources/General/KingfisherManager+LivePhoto.swift index 5e22e716b..46be06e37 100644 --- a/Sources/General/KingfisherManager+LivePhoto.swift +++ b/Sources/General/KingfisherManager+LivePhoto.swift @@ -24,6 +24,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if !os(watchOS) @preconcurrency import Photos public struct LivePhotoLoadingInfoResult: Sendable { @@ -201,3 +202,4 @@ extension ImageCache { } } } +#endif