Skip to content

Commit

Permalink
Support a macOS target.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Boyd authored and Jim Boyd committed Mar 3, 2021
1 parent ff01626 commit 5f3487a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let package = Package(
name: "Theme",
platforms: [
.iOS(.v9),
.tvOS(.v10)
.tvOS(.v10),
.macOS(.v10_13),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
Expand Down
2 changes: 2 additions & 0 deletions Sources/Theme/ThemeObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// THE SOFTWARE.
//

#if canImport(UIKit)
import UIKit

public protocol ThemeObserver {}
Expand All @@ -37,3 +38,4 @@ extension ThemeObserver where Self: UIViewController {
callback()
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Theme/UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// THE SOFTWARE.
//

#if canImport(UIKit)
import UIKit

public extension UIColor {
Expand Down Expand Up @@ -102,3 +103,4 @@ public extension UIColor {
return nil
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Theme/UIView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
// THE SOFTWARE.
//

#if canImport(UIKit)
import UIKit

extension UIView: ThemeObserver {

}
#endif
2 changes: 2 additions & 0 deletions Sources/Theme/UIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
// THE SOFTWARE.
//

#if canImport(UIKit)
import UIKit

extension UIViewController: ThemeObserver {

}
#endif

0 comments on commit 5f3487a

Please sign in to comment.