diff --git a/Package.swift b/Package.swift index d284945..51f1dcc 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,10 @@ let package = Package( name: "Puredux", platforms: [ .iOS(.v13), - .macOS(.v10_15) + .macOS(.v10_15), + .tvOS(.v12), + .watchOS(.v7) + ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. diff --git a/Sources/Puredux/UIKit/UIKitBindings.swift b/Sources/Puredux/UIKit/UIKitBindings.swift index 8ea13f2..184ef4c 100644 --- a/Sources/Puredux/UIKit/UIKitBindings.swift +++ b/Sources/Puredux/UIKit/UIKitBindings.swift @@ -5,13 +5,18 @@ // Created by Sergey Kazakov on 26/08/2024. // +import Dispatch +import Foundation + +#if canImport(UIKit) import UIKit -import SwiftUI extension UIViewController: UIStateObserver { } extension UIView: UIStateObserver { } +#endif + public protocol UIStateObserver: AnyObject { } extension UIStateObserver { diff --git a/Sources/Puredux/UIKit/UIStateObserver.swift b/Sources/Puredux/UIKit/UIStateObserver.swift new file mode 100644 index 0000000..ca68f63 --- /dev/null +++ b/Sources/Puredux/UIKit/UIStateObserver.swift @@ -0,0 +1,8 @@ +// +// File.swift +// +// +// Created by Sergey Kazakov on 03/09/2024. +// + +import Foundation