diff --git a/Sources/FASwiftUI/FAIcon.swift b/Sources/FASwiftUI/FAIcon.swift index 7b14ead..2c3978b 100644 --- a/Sources/FASwiftUI/FAIcon.swift +++ b/Sources/FASwiftUI/FAIcon.swift @@ -55,7 +55,11 @@ enum FACollection: String { } static func isAvailable(collection: FACollection) -> Bool { - return UIFont.familyNames.contains(collection.rawValue) + #if os(iOS) + return UIFont.familyNames.contains(collection.rawValue) + #elseif os(OSX) + return NSFontManager.shared.availableFontFamilies.contains(collection.rawValue) + #endif } } diff --git a/Sources/FASwiftUI/FASearchHolder.swift b/Sources/FASwiftUI/FASearchHolder.swift index 11a39b4..ab6ac6e 100644 --- a/Sources/FASwiftUI/FASearchHolder.swift +++ b/Sources/FASwiftUI/FASearchHolder.swift @@ -6,6 +6,8 @@ // Copyright © 2019 Matt Maddux. All rights reserved. // +#if os(iOS) + import SwiftUI class FASearchHolder: ObservableObject { @@ -62,3 +64,5 @@ class FASearchHolder: ObservableObject { } } } + +#endif