File tree 2 files changed +15
-16
lines changed
2 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Changelog
3
3
4
4
## master
5
5
6
+ - Fixed: ` @_spi ` errors (#339 )
7
+
6
8
## [ 0.11.0]
7
9
8
10
- Added: visionOS support (#327 )
Original file line number Diff line number Diff line change @@ -108,6 +108,17 @@ public protocol PlatformEntity: AnyObject {
108
108
func isDescendant( of other: Base ) -> Bool
109
109
}
110
110
111
+ extension PlatformEntity {
112
+ @_spi ( Internals)
113
+ public var ancestor : Base ? { nil }
114
+
115
+ @_spi ( Internals)
116
+ public var descendants : [ Base ] { [ ] }
117
+
118
+ @_spi ( Internals)
119
+ public func isDescendant( of other: Base ) -> Bool { false }
120
+ }
121
+
111
122
extension PlatformEntity {
112
123
@_spi ( Internals)
113
124
public var ancestors : some Sequence < Base > {
@@ -196,24 +207,10 @@ extension PlatformViewController: PlatformEntity {
196
207
197
208
#if canImport(UIKit)
198
209
extension UIPresentationController : PlatformEntity {
199
- @_spi ( Internals)
200
- public var ancestor : UIPresentationController ? { nil }
201
-
202
- @_spi ( Internals)
203
- public var descendants : [ UIPresentationController ] { [ ] }
204
-
205
- @_spi ( Internals)
206
- public func isDescendant( of other: UIPresentationController ) -> Bool { false }
210
+ public typealias Base = UIPresentationController
207
211
}
208
212
#elseif canImport(AppKit)
209
213
extension NSWindow : PlatformEntity {
210
- @_spi ( Internals)
211
- public var ancestor : NSWindow ? { nil }
212
-
213
- @_spi ( Internals)
214
- public var descendants : [ NSWindow ] { [ ] }
215
-
216
- @_spi ( Internals)
217
- public func isDescendant( of other: NSWindow ) -> Bool { false }
214
+ public typealias Base = NSWindow
218
215
}
219
216
#endif
You can’t perform that action at this time.
0 commit comments