diff --git a/Package.swift b/Package.swift index d261095..4d07f07 100644 --- a/Package.swift +++ b/Package.swift @@ -8,6 +8,7 @@ let package = Package( platforms: [ .iOS(.v13), .macOS(.v10_15), + .visionOS(.v1), ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. diff --git a/Sources/HTMLStreamer/AttributedStringConverter.swift b/Sources/HTMLStreamer/AttributedStringConverter.swift index bfff1d2..4f8d193 100644 --- a/Sources/HTMLStreamer/AttributedStringConverter.swift +++ b/Sources/HTMLStreamer/AttributedStringConverter.swift @@ -5,13 +5,13 @@ // Created by Shadowfacts on 11/24/23. // -#if os(iOS) +#if os(iOS) || os(visionOS) import UIKit #elseif os(macOS) import AppKit #endif -#if os(iOS) +#if os(iOS) || os(visionOS) private typealias PlatformFont = UIFont #elseif os(macOS) private typealias PlatformFont = NSFont @@ -351,7 +351,7 @@ public struct AttributedStringConverter { } public struct AttributedStringConverterConfiguration { - #if os(iOS) + #if os(iOS) || os(visionOS) public var font: UIFont public var monospaceFont: UIFont public var color: UIColor @@ -362,7 +362,7 @@ public struct AttributedStringConverterConfiguration { #endif public var paragraphStyle: NSParagraphStyle - #if os(iOS) + #if os(iOS) || os(visionOS) public init(font: UIFont, monospaceFont: UIFont, color: UIColor, paragraphStyle: NSParagraphStyle) { self.font = font self.monospaceFont = monospaceFont