Support building for visionOS
This commit is contained in:
parent
aa8f99bb96
commit
a86fe04348
|
@ -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.
|
||||
|
|
|
@ -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<Callbacks: HTMLConversionCallbacks> {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue