We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8120c7b commit d9094acCopy full SHA for d9094ac
Sources/OpenSwiftUICore/Text/Accessibility/Text+Accessibility.swift
@@ -106,6 +106,7 @@ package struct AccessibilityText: Equatable {
106
}
107
108
package init(_ string: Any) {
109
+ #if canImport(Darwin)
110
let object = string as AnyObject
111
if object.isKind(of: NSAttributedString.self) {
112
self.storage = .attributed(object as! NSAttributedString)
@@ -116,6 +117,9 @@ package struct AccessibilityText: Equatable {
116
117
} else {
118
preconditionFailure("not a string type")
119
120
+ #else
121
+ _openSwiftUIPlatformUnimplementedFailure()
122
+ #endif
123
124
125
package var text: Text {
0 commit comments