Skip to content

Commit

Permalink
Merge pull request #3 from jjamminjim/MAcOS
Browse files Browse the repository at this point in the history
macOS support
  • Loading branch information
stephanheilner authored Mar 3, 2021
2 parents 809d38d + 5f3487a commit 6ce06ea
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 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 All @@ -20,7 +21,8 @@ let package = Package(
targets: [
.target(
name: "Theme",
dependencies: ["Signals"]),
dependencies: ["Signals"],
exclude: ["Info.plist"]),
.testTarget(
name: "ThemeTests",
dependencies: ["Theme"]),
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 6ce06ea

Please sign in to comment.