From f97d069a70e3d1e7c87e2a55d39d790f05a95f6f Mon Sep 17 00:00:00 2001 From: Sergey Kazakov Date: Tue, 3 Sep 2024 15:28:43 +0100 Subject: [PATCH 1/2] fixed imports for macos --- Package.swift | 1 + Sources/Puredux/UIKit/UIKitBindings.swift | 7 ++++++- Sources/Puredux/UIKit/UIStateObserver.swift | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Sources/Puredux/UIKit/UIStateObserver.swift diff --git a/Package.swift b/Package.swift index d284945..05b009c 100644 --- a/Package.swift +++ b/Package.swift @@ -9,6 +9,7 @@ let package = Package( platforms: [ .iOS(.v13), .macOS(.v10_15) + ], 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 From 44dd5795296b2ec2d2be128207af3b2ded149723 Mon Sep 17 00:00:00 2001 From: Sergey Kazakov Date: Tue, 3 Sep 2024 15:30:54 +0100 Subject: [PATCH 2/2] added platforms --- Package.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 05b009c..51f1dcc 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,9 @@ let package = Package( name: "Puredux", platforms: [ .iOS(.v13), - .macOS(.v10_15) + .macOS(.v10_15), + .tvOS(.v12), + .watchOS(.v7) ], products: [