From 481f59cf412f41641d4b737d8fbb51433031ce03 Mon Sep 17 00:00:00 2001 From: Shibo Lyu Date: Fri, 20 Dec 2024 14:54:32 +0800 Subject: [PATCH] fix: macos build fixes #4 --- Sources/CropImage/PlatformImage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CropImage/PlatformImage.swift b/Sources/CropImage/PlatformImage.swift index 7963809..ab243b5 100644 --- a/Sources/CropImage/PlatformImage.swift +++ b/Sources/CropImage/PlatformImage.swift @@ -14,7 +14,7 @@ import AppKit /// On macOS, it's `NSImage` and on iOS/visionOS it's `UIImage`. public typealias PlatformImage = NSImage extension PlatformImage { - static let previewImage: PlatformImage = .init(contentsOf: URL(string: "file:///System/Library/Desktop%20Pictures/Hello%20Metallic%20Blue.heic")!)! + @MainActor static let previewImage: PlatformImage = .init(contentsOf: URL(string: "file:///System/Library/Desktop%20Pictures/Hello%20Metallic%20Blue.heic")!)! } #else import UIKit