Skip to content

Commit

Permalink
Fix to macOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmaddux committed Feb 4, 2020
1 parent 2681164 commit c42363d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/FASwiftUI/FAIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 4 additions & 0 deletions Sources/FASwiftUI/FASearchHolder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Matt Maddux. All rights reserved.
//

#if os(iOS)

import SwiftUI

class FASearchHolder: ObservableObject {
Expand Down Expand Up @@ -62,3 +64,5 @@ class FASearchHolder: ObservableObject {
}
}
}

#endif

0 comments on commit c42363d

Please sign in to comment.