Skip to content

Commit

Permalink
Fix macOS compatibility (#68)
Browse files Browse the repository at this point in the history
* fixed imports for macos

* added platforms
  • Loading branch information
KazaiMazai authored Sep 3, 2024
1 parent 99d8a32 commit 3b11b10
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion Sources/Puredux/UIKit/UIKitBindings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions Sources/Puredux/UIKit/UIStateObserver.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// File.swift
//
//
// Created by Sergey Kazakov on 03/09/2024.
//

import Foundation

0 comments on commit 3b11b10

Please sign in to comment.