Support building for visionOS
This commit is contained in:
parent
aa8f99bb96
commit
a86fe04348
|
@ -8,6 +8,7 @@ let package = Package(
|
||||||
platforms: [
|
platforms: [
|
||||||
.iOS(.v13),
|
.iOS(.v13),
|
||||||
.macOS(.v10_15),
|
.macOS(.v10_15),
|
||||||
|
.visionOS(.v1),
|
||||||
],
|
],
|
||||||
products: [
|
products: [
|
||||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
// 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.
|
// Created by Shadowfacts on 11/24/23.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS) || os(visionOS)
|
||||||
import UIKit
|
import UIKit
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
import AppKit
|
import AppKit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS) || os(visionOS)
|
||||||
private typealias PlatformFont = UIFont
|
private typealias PlatformFont = UIFont
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
private typealias PlatformFont = NSFont
|
private typealias PlatformFont = NSFont
|
||||||
|
@ -351,7 +351,7 @@ public struct AttributedStringConverter<Callbacks: HTMLConversionCallbacks> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct AttributedStringConverterConfiguration {
|
public struct AttributedStringConverterConfiguration {
|
||||||
#if os(iOS)
|
#if os(iOS) || os(visionOS)
|
||||||
public var font: UIFont
|
public var font: UIFont
|
||||||
public var monospaceFont: UIFont
|
public var monospaceFont: UIFont
|
||||||
public var color: UIColor
|
public var color: UIColor
|
||||||
|
@ -362,7 +362,7 @@ public struct AttributedStringConverterConfiguration {
|
||||||
#endif
|
#endif
|
||||||
public var paragraphStyle: NSParagraphStyle
|
public var paragraphStyle: NSParagraphStyle
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS) || os(visionOS)
|
||||||
public init(font: UIFont, monospaceFont: UIFont, color: UIColor, paragraphStyle: NSParagraphStyle) {
|
public init(font: UIFont, monospaceFont: UIFont, color: UIColor, paragraphStyle: NSParagraphStyle) {
|
||||||
self.font = font
|
self.font = font
|
||||||
self.monospaceFont = monospaceFont
|
self.monospaceFont = monospaceFont
|
||||||
|
|
Loading…
Reference in New Issue