From 0a84bccb465aa0960fbf5d40f9dba19817748531 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Wed, 27 Mar 2024 07:10:01 -0400 Subject: [PATCH] Fix missing publics and adjust test to catch --- Sources/NSUI/ViewControllerRepresentable.swift | 5 ++--- Tests/NSUITests/ViewControllerRepresentableTests.swift | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Sources/NSUI/ViewControllerRepresentable.swift b/Sources/NSUI/ViewControllerRepresentable.swift index b172cbf..52348f2 100644 --- a/Sources/NSUI/ViewControllerRepresentable.swift +++ b/Sources/NSUI/ViewControllerRepresentable.swift @@ -39,7 +39,6 @@ public extension NSUIViewControllerRepresentable { func sizeThatFits(_ proposal: ProposedViewSize, nsViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? { sizeThatFits(proposal, nsUIViewController: nsViewController, context: context) } - } #elseif canImport(UIKit) @@ -89,12 +88,12 @@ public extension NSUIViewControllerRepresentable { extension NSUIViewControllerRepresentable { @MainActor - static func dismantleNSUIViewController(_ viewController: Self.NSUIViewControllerType, coordinator: Self.Coordinator) { + public static func dismantleNSUIViewController(_ viewController: Self.NSUIViewControllerType, coordinator: Self.Coordinator) { } @available(iOS 16.0, tvOS 16.0, macOS 13.0, *) @MainActor - func sizeThatFits(_ proposal: ProposedViewSize, nsUIViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? { + public func sizeThatFits(_ proposal: ProposedViewSize, nsUIViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? { nil } } diff --git a/Tests/NSUITests/ViewControllerRepresentableTests.swift b/Tests/NSUITests/ViewControllerRepresentableTests.swift index c1f566a..d7ec6b7 100644 --- a/Tests/NSUITests/ViewControllerRepresentableTests.swift +++ b/Tests/NSUITests/ViewControllerRepresentableTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import NSUI +import NSUI @MainActor struct RepresentedViewController: NSUIViewControllerRepresentable {