Skip to content

Commit a78cd37

Browse files
authored
Merge branch 'main' into ci/2026-tests
2 parents ec53c08 + 9bedf1e commit a78cd37

File tree

9 files changed

+417
-8
lines changed

9 files changed

+417
-8
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,39 @@ jobs:
180180
- if: ${{ matrix.platform[0] != 'watchOS' }}
181181
name: Run Tests
182182
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectTests configuration:Debug
183+
184+
framework-archiving:
185+
name: Archive Framework (${{ matrix.platform }})
186+
runs-on: macos-15
187+
strategy:
188+
fail-fast: false
189+
matrix:
190+
platform: [iOS, macOS, tvOS, watchOS, visionOS, macCatalyst]
191+
include:
192+
- platform: iOS
193+
destination: "generic/platform=iOS"
194+
- platform: macOS
195+
destination: "generic/platform=macOS"
196+
- platform: tvOS
197+
destination: "generic/platform=tvOS"
198+
- platform: watchOS
199+
destination: "generic/platform=watchOS"
200+
- platform: visionOS
201+
destination: "generic/platform=visionOS"
202+
- platform: macCatalyst
203+
destination: "platform=macOS,variant=Mac Catalyst"
204+
steps:
205+
- name: Git Checkout
206+
uses: actions/checkout@v4
207+
208+
- name: Select Xcode version
209+
run: sudo xcodes select 16.4
210+
211+
- name: Archive Framework
212+
run: |
213+
xcodebuild archive \
214+
-scheme "SwiftUIIntrospectTestFramework" \
215+
-destination "${{ matrix.destination }}" \
216+
-archivePath .build/archiving/${{ matrix.platform }} \
217+
SKIP_INSTALL=NO \
218+
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

Sources/Introspect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct IntrospectModifier<SwiftUIViewType: IntrospectableViewType, PlatformSpeci
107107
}
108108

109109
@MainActor
110-
public protocol PlatformEntity: AnyObject {
110+
public protocol PlatformEntity: AnyObject, Sendable {
111111
associatedtype Base: PlatformEntity
112112

113113
@_spi(Internals)

Sources/IntrospectionSelector.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#if !os(watchOS)
2-
@_spi(Advanced)
2+
#if os(iOS) || os(tvOS) || os(visionOS)
3+
public import UIKit
4+
#elseif os(macOS)
5+
public import AppKit
6+
#endif
37

8+
@_spi(Advanced)
49
@MainActor
510
public struct IntrospectionSelector<Target: PlatformEntity> {
611
@_spi(Advanced)

Sources/ViewTypes/TabView.swift

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949
/// }
5050
/// ```
5151
///
52+
/// ### macOS 15+ (non-root placement only)
53+
///
54+
/// ```swift
55+
/// struct ContentView: View {
56+
/// var body: some View {
57+
/// GroupBox {
58+
/// TabView {
59+
/// Text("Tab 1").tabItem { Text("Tab 1") }
60+
/// Text("Tab 2").tabItem { Text("Tab 2") }
61+
/// }
62+
/// .introspect(.tabView, on: .macOS(.v15, .v26)) {
63+
/// print(type(of: $0)) // NSTabView
64+
/// }
65+
/// }
66+
/// }
67+
/// }
68+
/// ```
69+
///
5270
/// ### visionOS
5371
///
5472
/// Not available.
@@ -100,10 +118,8 @@ extension macOSViewVersion<TabViewType, NSTabView> {
100118
public static let v12 = Self(for: .v12)
101119
public static let v13 = Self(for: .v13)
102120
public static let v14 = Self(for: .v14)
103-
@available(*, unavailable, message: "TabView is no longer backed by NSTabView starting macOS 15")
104-
public static let v15 = Self.unavailable()
105-
@available(*, unavailable, message: "TabView is no longer backed by NSTabView starting macOS 15")
106-
public static let v26 = Self.unavailable()
121+
public static let v15 = Self(for: .v15)
122+
public static let v26 = Self(for: .v26)
107123
}
108124
#endif
109125
#endif
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//
2+
// TestFramework.swift
3+
// TestFramework
4+
//
5+
// Created by David Roman on 30/07/2025.
6+
//
7+
8+
import Foundation
9+

0 commit comments

Comments
 (0)