Skip to content

Commit

Permalink
Fix xcframework interface issue
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Jun 14, 2024
1 parent 8869be2 commit 4b7e022
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Sources/General/ImageSource/AVAssetImageDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@
#if !os(watchOS)

import Foundation
@preconcurrency import AVKit
import AVKit

#if canImport(MobileCoreServices)
import MobileCoreServices
#else
import CoreServices
#endif

#if swift(>=6)
extension AVAssetImageGenerator: @unchecked @retroactive Sendable { }
#else
extension AVAssetImageGenerator: @unchecked Sendable { }
#endif

/// A data provider to provide thumbnail data from a given AVKit asset.
public struct AVAssetImageDataProvider: ImageDataProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ import Foundation

#if os(iOS) || os(macOS) || os(visionOS)

@preconcurrency import PhotosUI
import PhotosUI

#if swift(>=6)
@available(iOS 14.0, macOS 13.0, *)
extension PHPickerResult: @unchecked @retroactive Sendable { }
#else
@available(iOS 14.0, macOS 13.0, *)
extension PHPickerResult: @unchecked Sendable { }
#endif

/// A data provider to provide image data from a given `PHPickerResult`.
@available(iOS 14.0, macOS 13.0, *)
Expand Down

0 comments on commit 4b7e022

Please sign in to comment.