From 0b4080851d5a0d9a69b580f50b8fd8ebc2652673 Mon Sep 17 00:00:00 2001
From: tobias <thinkdifferent055@gmail.com>
Date: Tue, 10 Jun 2025 15:05:27 +0200
Subject: [PATCH] Fix imports for macos

---
 AppleLibs/Utils/CoreData/CoreData+Extended.swift | 2 ++
 AppleLibs/Utils/String/String+Html.swift         | 4 ++++
 AppleLibs/Utils/String/String+Size.swift         | 2 ++
 AppleLibs/View/UIColor+Hex.swift                 | 2 ++
 AppleLibs/View/UIViewController+Screenshot.swift | 2 ++
 5 files changed, 12 insertions(+)

diff --git a/AppleLibs/Utils/CoreData/CoreData+Extended.swift b/AppleLibs/Utils/CoreData/CoreData+Extended.swift
index 50bcd87..137b072 100644
--- a/AppleLibs/Utils/CoreData/CoreData+Extended.swift
+++ b/AppleLibs/Utils/CoreData/CoreData+Extended.swift
@@ -6,6 +6,7 @@
 //  Copyright © 2019 Tobias. All rights reserved.
 //
 
+#if os(iOS)
 import UIKit
 import CoreData
 import Resolver
@@ -128,3 +129,4 @@ extension NSManagedObject
         }
     }
 }
+#endif
diff --git a/AppleLibs/Utils/String/String+Html.swift b/AppleLibs/Utils/String/String+Html.swift
index f867d30..4482b6a 100644
--- a/AppleLibs/Utils/String/String+Html.swift
+++ b/AppleLibs/Utils/String/String+Html.swift
@@ -5,7 +5,11 @@
 //  Created by Tobias on 24.03.21.
 //
 
+#if os(iOS)
 import UIKit
+#elseif os(macOS)
+import AppKit
+#endif
 
 public extension String {
     var htmlToAttributedString: NSMutableAttributedString? {
diff --git a/AppleLibs/Utils/String/String+Size.swift b/AppleLibs/Utils/String/String+Size.swift
index 9bd11f6..0d55a86 100644
--- a/AppleLibs/Utils/String/String+Size.swift
+++ b/AppleLibs/Utils/String/String+Size.swift
@@ -5,6 +5,7 @@
 //  Created by Tobias on 04.04.21.
 //
 
+#if os(iOS)
 import UIKit
 
 public extension String {
@@ -22,3 +23,4 @@ public extension String {
         return ceil(boundingBox.width)
     }
 }
+#endif
diff --git a/AppleLibs/View/UIColor+Hex.swift b/AppleLibs/View/UIColor+Hex.swift
index b8ef700..999faf1 100644
--- a/AppleLibs/View/UIColor+Hex.swift
+++ b/AppleLibs/View/UIColor+Hex.swift
@@ -5,6 +5,7 @@
 //  Created by Tobias on 15.07.21.
 //
 
+#if os(iOS)
 import UIKit
 
 public extension UIColor {
@@ -19,3 +20,4 @@ public extension UIColor {
                   alpha: alpha)
     }
 }
+#endif
diff --git a/AppleLibs/View/UIViewController+Screenshot.swift b/AppleLibs/View/UIViewController+Screenshot.swift
index 585cf87..5567be8 100644
--- a/AppleLibs/View/UIViewController+Screenshot.swift
+++ b/AppleLibs/View/UIViewController+Screenshot.swift
@@ -5,6 +5,7 @@
 //  Created by Tobias on 29.04.21.
 //
 
+#if os(iOS)
 import UIKit
 
 extension UIViewController
@@ -28,3 +29,4 @@ extension UIViewController
         return screenshotImage
     }
 }
+#endif
-- 
GitLab