From 30694515bd96938854aab6aa0d946a5472804915 Mon Sep 17 00:00:00 2001 From: Daniel Saidi Date: Thu, 18 Jan 2024 10:19:52 +0100 Subject: [PATCH] Fix platform build errors --- .../RichTextKit/_Deprecated/RichTextAction+Deprecated.swift | 2 ++ .../RichTextKit/_Deprecated/RichTextCommands+Deprecated.swift | 3 ++- Sources/RichTextKit/_Deprecated/RichTextData+Deprecated.swift | 2 ++ .../RichTextCoordinator+SubscriptionsTests.swift | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/RichTextKit/_Deprecated/RichTextAction+Deprecated.swift b/Sources/RichTextKit/_Deprecated/RichTextAction+Deprecated.swift index 4dc4c4698..fda097297 100644 --- a/Sources/RichTextKit/_Deprecated/RichTextAction+Deprecated.swift +++ b/Sources/RichTextKit/_Deprecated/RichTextAction+Deprecated.swift @@ -42,8 +42,10 @@ public extension RichTextAction { @available(*, deprecated, renamed: "RichTextAction.Button") public typealias RichTextActionButton = RichTextAction.Button +#if iOS || macOS || os(visionOS) @available(*, deprecated, renamed: "RichTextAction.ButtonGroup") public typealias RichTextActionButtonGroup = RichTextAction.ButtonGroup +#endif @available(*, deprecated, renamed: "RichTextAction.ButtonStack") public typealias RichTextActionButtonStack = RichTextAction.ButtonStack diff --git a/Sources/RichTextKit/_Deprecated/RichTextCommands+Deprecated.swift b/Sources/RichTextKit/_Deprecated/RichTextCommands+Deprecated.swift index c4917f173..916dfc418 100644 --- a/Sources/RichTextKit/_Deprecated/RichTextCommands+Deprecated.swift +++ b/Sources/RichTextKit/_Deprecated/RichTextCommands+Deprecated.swift @@ -18,9 +18,10 @@ public typealias RichTextCommandsIndentOptionsGroup = RichTextCommand.IndentOpti @available(*, deprecated, renamed: "RichTextCommand.StyleOptionsGroup") public typealias RichTextCommandsStyleOptionsGroup = RichTextCommand.StyleOptionsGroup +#if iOS || macOS || os(visionOS) @available(*, deprecated, renamed: "RichTextCommand.FormatMenu") public typealias RichTextFormatCommandMenu = RichTextCommand.FormatMenu @available(*, deprecated, renamed: "RichTextCommand.ShareMenu") public typealias RichTextShareCommandMenu = RichTextCommand.ShareMenu - +#endif diff --git a/Sources/RichTextKit/_Deprecated/RichTextData+Deprecated.swift b/Sources/RichTextKit/_Deprecated/RichTextData+Deprecated.swift index 8d6aab2ab..8bd8e7aa4 100644 --- a/Sources/RichTextKit/_Deprecated/RichTextData+Deprecated.swift +++ b/Sources/RichTextKit/_Deprecated/RichTextData+Deprecated.swift @@ -1,4 +1,6 @@ import SwiftUI +#if iOS || os(visionOS) @available(*, deprecated, renamed: "RichTextDataFormat.Menu") public typealias RichTextDataFormatMenu = RichTextDataFormat.Menu +#endif diff --git a/Tests/RichTextKitTests/RichTextCoordinator+SubscriptionsTests.swift b/Tests/RichTextKitTests/RichTextCoordinator+SubscriptionsTests.swift index d00838478..b6cfb5578 100644 --- a/Tests/RichTextKitTests/RichTextCoordinator+SubscriptionsTests.swift +++ b/Tests/RichTextKitTests/RichTextCoordinator+SubscriptionsTests.swift @@ -57,7 +57,7 @@ final class RichTextCoordinator_SubscriptionsTests: XCTestCase { #if iOS || os(tvOS) XCTAssertEqual(self.textView.richTextFont?.fontName, ".SFUI-Regular") #elseif macOS - XCTAssertEqual(self.textView.richTextFontName, ".AppleSystemUIFont") + XCTAssertEqual(self.textView.richTextFont?.fontName, ".AppleSystemUIFont") #endif } }