Skip to content

Commit fcedb64

Browse files
authored
Merge branch 'main' into patch-1
2 parents b01803b + 7835bc9 commit fcedb64

File tree

113 files changed

+1061
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+1061
-540
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,75 +42,98 @@ jobs:
4242
include:
4343
- platform: [iOS, 15]
4444
runtime: iOS 15.5
45-
os: macos-13
46-
xcode: 15.0.1
45+
os: macos-14
46+
xcode: 16.2
4747
install: true
4848
- platform: [iOS, 16]
4949
runtime: iOS 16.4
50-
os: macos-13
51-
xcode: 14.3.1
50+
os: macos-14
51+
xcode: 16.2
52+
install: true
5253
- platform: [iOS, 17]
5354
runtime: iOS 17.5
5455
os: macos-14
55-
xcode: 15.4
56-
- platform: [iOS, 18]
57-
runtime: iOS 18.2
58-
os: macos-14
5956
xcode: 16.2
57+
- platform: [iOS, 18]
58+
runtime: iOS 18.5
59+
os: macos-15
60+
xcode: 16.4
61+
# - platform: [iOS, 26]
62+
# runtime: iOS 26.0
63+
# os: macos-15
64+
# xcode: 26.0
6065

6166
- platform: [tvOS, 15]
6267
runtime: tvOS 15.4
63-
os: macos-13
64-
xcode: 15.0.1
68+
os: macos-14
69+
xcode: 16.2
6570
install: true
6671
- platform: [tvOS, 16]
6772
runtime: tvOS 16.4
68-
os: macos-13
69-
xcode: 15.0.1
73+
os: macos-14
74+
xcode: 16.2
75+
install: true
7076
- platform: [tvOS, 17]
7177
runtime: tvOS 17.5
7278
os: macos-14
73-
xcode: 15.4
74-
- platform: [tvOS, 18]
75-
runtime: tvOS 18.2
76-
os: macos-14
7779
xcode: 16.2
80+
- platform: [tvOS, 18]
81+
runtime: tvOS 18.5
82+
os: macos-15
83+
xcode: 16.4
84+
# - platform: [tvOS, 26]
85+
# runtime: tvOS 26.0
86+
# os: macos-15
87+
# xcode: 26.0
7888

7989
- platform: [watchOS, 8]
8090
runtime: watchOS 8.5
81-
os: macos-13
82-
xcode: 15.0.1
91+
os: macos-14
92+
xcode: 16.2
8393
install: true
8494
- platform: [watchOS, 9]
8595
runtime: watchOS 9.4
86-
os: macos-13
87-
xcode: 14.3.1
96+
os: macos-14
97+
xcode: 16.2
98+
install: true
8899
- platform: [watchOS, 10]
89100
runtime: watchOS 10.5
90101
os: macos-14
91-
xcode: 15.4
92-
- platform: [watchOS, 11]
93-
runtime: watchOS 11.2
94-
os: macos-14
95102
xcode: 16.2
103+
- platform: [watchOS, 11]
104+
runtime: watchOS 11.5
105+
os: macos-15
106+
xcode: 16.4
107+
# - platform: [watchOS, 26]
108+
# runtime: watchOS 26.0
109+
# os: macos-15
110+
# xcode: 26.0
96111

97-
- platform: [macOS, 13]
98-
runtime: macOS 13
99-
os: macos-13
100-
xcode: 15.0.1
101112
- platform: [macOS, 14]
102113
runtime: macOS 14
103114
os: macos-14
104-
xcode: 15.4
115+
xcode: 16.2
116+
- platform: [macOS, 15]
117+
runtime: macOS 15
118+
os: macos-15
119+
xcode: 16.2
120+
# - platform: [macOS, 26]
121+
# runtime: macOS 26.0
122+
# os: macos-15
123+
# xcode: 26.0
105124

106125
- platform: [visionOS, 1]
107126
runtime: visionOS 1.2
108127
os: macos-14
109-
xcode: 15.4
128+
xcode: 16.2
110129
- platform: [visionOS, 2]
111130
runtime: visionOS 2.5
112131
os: macos-15
113132
xcode: 16.4
133+
# - platform: [visionOS, 26]
134+
# runtime: visionOS 26.0
135+
# os: macos-15
136+
# xcode: 26.0
114137
steps:
115138
- name: Git Checkout
116139
uses: actions/checkout@v4

.spi.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ version: 1
22
builder:
33
configs:
44
- documentation_targets: [SwiftUIIntrospect]
5-
custom_documentation_parameters: [--include-extended-types]

Examples/Showcase/Showcase/AppView.swift

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For instance, when introspecting a `ScrollView`...
2020
ScrollView {
2121
Text("Item 1")
2222
}
23-
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in
23+
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { scrollView in
2424
// do something with UIScrollView
2525
}
2626
```
@@ -38,7 +38,7 @@ By default, the `.introspect` modifier acts directly on its _receiver_. This mea
3838
```swift
3939
ScrollView {
4040
Text("Item 1")
41-
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { scrollView in
41+
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), scope: .ancestor) { scrollView in
4242
// do something with UIScrollView
4343
}
4444
}
@@ -157,7 +157,7 @@ List {
157157
tableView.backgroundView = UIView()
158158
tableView.backgroundColor = .cyan
159159
}
160-
.introspect(.list, on: .iOS(.v16, .v17, .v18)) { collectionView in
160+
.introspect(.list, on: .iOS(.v16, .v17, .v18, .v26)) { collectionView in
161161
collectionView.backgroundView = UIView()
162162
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
163163
}
@@ -169,7 +169,7 @@ List {
169169
ScrollView {
170170
Text("Item")
171171
}
172-
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in
172+
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { scrollView in
173173
scrollView.backgroundColor = .red
174174
}
175175
```
@@ -181,7 +181,7 @@ NavigationView {
181181
Text("Item")
182182
}
183183
.navigationViewStyle(.stack)
184-
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { navigationController in
184+
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { navigationController in
185185
navigationController.navigationBar.backgroundColor = .cyan
186186
}
187187
```
@@ -190,7 +190,7 @@ NavigationView {
190190

191191
```swift
192192
TextField("Text Field", text: <#Binding<String>#>)
193-
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { textField in
193+
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { textField in
194194
textField.backgroundColor = .red
195195
}
196196
```
@@ -224,6 +224,7 @@ extension iOSViewVersion<TextFieldType, UITextField> {
224224
public static let v16 = Self(for: .v16)
225225
public static let v17 = Self(for: .v17)
226226
public static let v18 = Self(for: .v18)
227+
public static let v26 = Self(for: .v26)
227228
}
228229

229230
extension tvOSViewVersion<TextFieldType, UITextField> {
@@ -233,11 +234,13 @@ extension tvOSViewVersion<TextFieldType, UITextField> {
233234
public static let v16 = Self(for: .v16)
234235
public static let v17 = Self(for: .v17)
235236
public static let v18 = Self(for: .v18)
237+
public static let v26 = Self(for: .v26)
236238
}
237239

238240
extension visionOSViewVersion<TextFieldType, UITextField> {
239241
public static let v1 = Self(for: .v1)
240242
public static let v2 = Self(for: .v2)
243+
public static let v26 = Self(for: .v26)
241244
}
242245
#elseif canImport(AppKit)
243246
extension macOSViewVersion<TextFieldType, NSTextField> {
@@ -247,6 +250,7 @@ extension macOSViewVersion<TextFieldType, NSTextField> {
247250
public static let v13 = Self(for: .v13)
248251
public static let v14 = Self(for: .v14)
249252
public static let v15 = Self(for: .v15)
253+
public static let v26 = Self(for: .v26)
250254
}
251255
#endif
252256
```
@@ -290,7 +294,7 @@ struct ContentView: View {
290294
ScrollView {
291295
// ...
292296
}
293-
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in
297+
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { scrollView in
294298
self.scrollView = scrollView
295299
}
296300
}

Sources/Introspect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension View {
3434
///
3535
/// var body: some View {
3636
/// TextField("Placeholder", text: $text)
37-
/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) {
37+
/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) {
3838
/// print(type(of: $0)) // UITextField
3939
/// }
4040
/// }

Sources/PlatformVersion.swift

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,20 @@ extension iOSVersion {
122122
return nil
123123
#endif
124124
}
125+
126+
public static let v26 = iOSVersion {
127+
#if os(iOS)
128+
if #available(iOS 27, *) {
129+
return .past
130+
}
131+
if #available(iOS 26, *) {
132+
return .current
133+
}
134+
return .future
135+
#else
136+
return nil
137+
#endif
138+
}
125139
}
126140

127141
public struct tvOSVersion: PlatformVersion {
@@ -192,17 +206,17 @@ extension tvOSVersion {
192206
}
193207

194208
public static let v17 = tvOSVersion {
195-
#if os(tvOS)
209+
#if os(tvOS)
196210
if #available(tvOS 18, *) {
197211
return .past
198212
}
199213
if #available(tvOS 17, *) {
200214
return .current
201215
}
202216
return .future
203-
#else
217+
#else
204218
return nil
205-
#endif
219+
#endif
206220
}
207221

208222
public static let v18 = tvOSVersion {
@@ -218,6 +232,20 @@ extension tvOSVersion {
218232
return nil
219233
#endif
220234
}
235+
236+
public static let v26 = tvOSVersion {
237+
#if os(tvOS)
238+
if #available(tvOS 27, *) {
239+
return .past
240+
}
241+
if #available(tvOS 26, *) {
242+
return .current
243+
}
244+
return .future
245+
#else
246+
return nil
247+
#endif
248+
}
221249
}
222250

223251
public struct macOSVersion: PlatformVersion {
@@ -328,6 +356,20 @@ extension macOSVersion {
328356
return nil
329357
#endif
330358
}
359+
360+
public static let v26 = macOSVersion {
361+
#if os(macOS)
362+
if #available(macOS 27, *) {
363+
return .past
364+
}
365+
if #available(macOS 26, *) {
366+
return .current
367+
}
368+
return .future
369+
#else
370+
return nil
371+
#endif
372+
}
331373
}
332374

333375
public struct visionOSVersion: PlatformVersion {
@@ -368,5 +410,19 @@ extension visionOSVersion {
368410
return nil
369411
#endif
370412
}
413+
414+
public static let v26 = visionOSVersion {
415+
#if os(visionOS)
416+
if #available(visionOS 27, *) {
417+
return .past
418+
}
419+
if #available(visionOS 26, *) {
420+
return .current
421+
}
422+
return .future
423+
#else
424+
return nil
425+
#endif
426+
}
371427
}
372428
#endif

Sources/ViewTypes/Button.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import SwiftUI
1717
/// struct ContentView: View {
1818
/// var body: some View {
1919
/// Button("Action", action: {})
20-
/// .introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) {
20+
/// .introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15, .v26)) {
2121
/// print(type(of: $0)) // NSButton
2222
/// }
2323
/// }
@@ -42,6 +42,7 @@ extension macOSViewVersion<ButtonType, NSButton> {
4242
public static let v13 = Self(for: .v13)
4343
public static let v14 = Self(for: .v14)
4444
public static let v15 = Self(for: .v15)
45+
public static let v26 = Self(for: .v26)
4546
}
4647
#endif
4748
#endif

0 commit comments

Comments
 (0)