From e54ece65a6fe5b2cae5044564a7b7b63e3f93e90 Mon Sep 17 00:00:00 2001 From: Alexis Schultz Date: Fri, 12 Jul 2024 10:32:25 +0200 Subject: [PATCH 01/21] [Swift 6] Update Sources for Swift 6 --- Sources/Introspect.swift | 16 +++++- Sources/IntrospectableViewType.swift | 1 + Sources/IntrospectionSelector.swift | 14 ++++-- Sources/IntrospectionView.swift | 2 + Sources/PlatformVersion.swift | 4 +- Sources/PlatformView.swift | 18 +++---- Sources/PlatformViewVersion.swift | 2 + Sources/RuntimeWarnings.swift | 2 +- Sources/ViewTypes/Button.swift | 14 +++--- Sources/ViewTypes/ColorPicker.swift | 28 +++++------ Sources/ViewTypes/DatePicker.swift | 30 +++++------ .../DatePickerWithCompactStyle.swift | 34 ++++++------- .../ViewTypes/DatePickerWithFieldStyle.swift | 16 +++--- .../DatePickerWithGraphicalStyle.swift | 32 ++++++------ .../DatePickerWithStepperFieldStyle.swift | 16 +++--- .../ViewTypes/DatePickerWithWheelStyle.swift | 20 ++++---- Sources/ViewTypes/Form.swift | 30 +++++------ Sources/ViewTypes/FormWithGroupedStyle.swift | 42 ++++++++-------- Sources/ViewTypes/FullScreenCover.swift | 36 ++++++------- Sources/ViewTypes/List.swift | 46 ++++++++--------- Sources/ViewTypes/ListCell.swift | 44 ++++++++-------- Sources/ViewTypes/ListWithBorderedStyle.swift | 16 +++--- Sources/ViewTypes/ListWithGroupedStyle.swift | 32 ++++++------ .../ViewTypes/ListWithInsetGroupedStyle.swift | 20 ++++---- Sources/ViewTypes/ListWithInsetStyle.swift | 32 ++++++------ Sources/ViewTypes/ListWithSidebarStyle.swift | 32 ++++++------ Sources/ViewTypes/Map.swift | 40 +++++++-------- Sources/ViewTypes/NavigationSplitView.swift | 48 +++++++++--------- Sources/ViewTypes/NavigationStack.swift | 36 ++++++------- .../NavigationViewWithColumnsStyle.swift | 50 +++++++++---------- .../NavigationViewWithStackStyle.swift | 38 +++++++------- Sources/ViewTypes/PageControl.swift | 30 +++++------ Sources/ViewTypes/PickerWithMenuStyle.swift | 16 +++--- .../ViewTypes/PickerWithSegmentedStyle.swift | 44 ++++++++-------- Sources/ViewTypes/PickerWithWheelStyle.swift | 20 ++++---- Sources/ViewTypes/Popover.swift | 22 ++++---- .../ProgressViewWithCircularStyle.swift | 44 ++++++++-------- .../ProgressViewWithLinearStyle.swift | 44 ++++++++-------- Sources/ViewTypes/ScrollView.swift | 42 ++++++++-------- Sources/ViewTypes/SearchField.swift | 36 ++++++------- Sources/ViewTypes/SecureField.swift | 42 ++++++++-------- Sources/ViewTypes/Sheet.swift | 46 ++++++++--------- Sources/ViewTypes/Slider.swift | 26 +++++----- Sources/ViewTypes/Stepper.swift | 26 +++++----- Sources/ViewTypes/TabView.swift | 40 ++++++++------- Sources/ViewTypes/TabViewWithPageStyle.swift | 32 ++++++------ Sources/ViewTypes/Table.swift | 30 +++++------ Sources/ViewTypes/TextEditor.swift | 30 +++++------ Sources/ViewTypes/TextField.swift | 42 ++++++++-------- .../ViewTypes/TextFieldWithVerticalAxis.swift | 44 ++++++++-------- Sources/ViewTypes/Toggle.swift | 26 +++++----- Sources/ViewTypes/ToggleWithButtonStyle.swift | 16 +++--- .../ViewTypes/ToggleWithCheckboxStyle.swift | 16 +++--- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 28 +++++------ Sources/ViewTypes/VideoPlayer.swift | 42 ++++++++-------- Sources/ViewTypes/View.swift | 40 +++++++-------- Sources/ViewTypes/ViewController.swift | 30 +++++------ Sources/ViewTypes/Window.swift | 44 ++++++++-------- 58 files changed, 859 insertions(+), 830 deletions(-) diff --git a/Sources/Introspect.swift b/Sources/Introspect.swift index ba94ed5f..b3e1b9fe 100644 --- a/Sources/Introspect.swift +++ b/Sources/Introspect.swift @@ -4,7 +4,7 @@ import SwiftUI /// The scope of introspection i.e. where introspect should look to find /// the desired target view relative to the applied `.introspect(...)` /// modifier. -public struct IntrospectionScope: OptionSet { +public struct IntrospectionScope: OptionSet, Sendable { /// Look within the `receiver` of the `.introspect(...)` modifier. public static let receiver = Self(rawValue: 1 << 0) /// Look for an `ancestor` relative to the `.introspect(...)` modifier. @@ -40,6 +40,7 @@ extension View { /// } /// } /// ``` + @MainActor public func introspect( _ viewType: SwiftUIViewType, on platforms: (PlatformViewVersionPredicate)..., @@ -56,6 +57,7 @@ struct IntrospectModifier? let customize: (PlatformSpecificEntity) -> Void + @MainActor init( _ viewType: SwiftUIViewType, platforms: [PlatformViewVersionPredicate], @@ -100,37 +102,46 @@ public protocol PlatformEntity: AnyObject { associatedtype Base: PlatformEntity @_spi(Internals) + @MainActor var ancestor: Base? { get } @_spi(Internals) + @MainActor var descendants: [Base] { get } @_spi(Internals) + @MainActor func isDescendant(of other: Base) -> Bool } extension PlatformEntity { @_spi(Internals) + @MainActor public var ancestor: Base? { nil } @_spi(Internals) + @MainActor public var descendants: [Base] { [] } @_spi(Internals) + @MainActor public func isDescendant(of other: Base) -> Bool { false } } extension PlatformEntity { @_spi(Internals) + @MainActor public var ancestors: some Sequence { sequence(first: self~, next: { $0.ancestor~ }).dropFirst() } @_spi(Internals) + @MainActor public var allDescendants: some Sequence { recursiveSequence([self~], children: { $0.descendants~ }).dropFirst() } + @MainActor func nearestCommonAncestor(with other: Base) -> Base? { var nearestAncestor: Base? = self~ @@ -141,6 +152,7 @@ extension PlatformEntity { return nearestAncestor } + @MainActor func allDescendants(between bottomEntity: Base, and topEntity: Base) -> some Sequence { self.allDescendants .lazy @@ -148,6 +160,7 @@ extension PlatformEntity { .prefix(while: { $0 !== topEntity }) } + @MainActor func receiver( ofType type: PlatformSpecificEntity.Type ) -> PlatformSpecificEntity? { @@ -166,6 +179,7 @@ extension PlatformEntity { .first } + @MainActor func ancestor( ofType type: PlatformSpecificEntity.Type ) -> PlatformSpecificEntity? { diff --git a/Sources/IntrospectableViewType.swift b/Sources/IntrospectableViewType.swift index c3e6cb8a..8851e6ce 100644 --- a/Sources/IntrospectableViewType.swift +++ b/Sources/IntrospectableViewType.swift @@ -1,4 +1,5 @@ #if !os(watchOS) +@MainActor public protocol IntrospectableViewType { /// The scope of introspection for this particular view type, i.e. where introspect /// should look to find the desired target view relative to the applied diff --git a/Sources/IntrospectionSelector.swift b/Sources/IntrospectionSelector.swift index 0253aa89..3f59b567 100644 --- a/Sources/IntrospectionSelector.swift +++ b/Sources/IntrospectionSelector.swift @@ -1,11 +1,14 @@ #if !os(watchOS) @_spi(Advanced) +@MainActor public struct IntrospectionSelector { @_spi(Advanced) + @MainActor public static var `default`: Self { .from(Target.self, selector: { $0 }) } @_spi(Advanced) - public static func from(_ entryType: Entry.Type, selector: @escaping (Entry) -> Target?) -> Self { + @MainActor + public static func from(_ entryType: Entry.Type, selector: @MainActor @escaping (Entry) -> Target?) -> Self { .init( receiverSelector: { controller in controller.as(Entry.Base.self)?.receiver(ofType: Entry.self).flatMap(selector) @@ -16,12 +19,12 @@ public struct IntrospectionSelector { ) } - private var receiverSelector: (IntrospectionPlatformViewController) -> Target? - private var ancestorSelector: (IntrospectionPlatformViewController) -> Target? + private var receiverSelector: @MainActor (IntrospectionPlatformViewController) -> Target? + private var ancestorSelector: @MainActor (IntrospectionPlatformViewController) -> Target? private init( - receiverSelector: @escaping (IntrospectionPlatformViewController) -> Target?, - ancestorSelector: @escaping (IntrospectionPlatformViewController) -> Target? + receiverSelector: @MainActor @escaping (IntrospectionPlatformViewController) -> Target?, + ancestorSelector: @MainActor @escaping (IntrospectionPlatformViewController) -> Target? ) { self.receiverSelector = receiverSelector self.ancestorSelector = ancestorSelector @@ -41,6 +44,7 @@ public struct IntrospectionSelector { return copy } + @MainActor func callAsFunction(_ controller: IntrospectionPlatformViewController, _ scope: IntrospectionScope) -> Target? { if scope.contains(.receiver), diff --git a/Sources/IntrospectionView.swift b/Sources/IntrospectionView.swift index 55c96356..2386f1e6 100644 --- a/Sources/IntrospectionView.swift +++ b/Sources/IntrospectionView.swift @@ -4,6 +4,7 @@ import SwiftUI typealias IntrospectionViewID = UUID fileprivate enum IntrospectionStore { + @MainActor static var shared: [IntrospectionViewID: Pair] = [:] struct Pair { @@ -13,6 +14,7 @@ fileprivate enum IntrospectionStore { } extension PlatformEntity { + @MainActor var introspectionAnchorEntity: Base? { if let introspectionController = self as? IntrospectionPlatformViewController { return IntrospectionStore.shared[introspectionController.id]?.anchor~ diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index 2600bc7f..49e50a7f 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -2,13 +2,13 @@ import Foundation @_spi(Internals) -public enum PlatformVersionCondition { +public enum PlatformVersionCondition: Sendable { case past case current case future } -public protocol PlatformVersion { +public protocol PlatformVersion: Sendable { @_spi(Internals) var condition: PlatformVersionCondition? { get } } diff --git a/Sources/PlatformView.swift b/Sources/PlatformView.swift index 045b47d6..9fcb4a55 100644 --- a/Sources/PlatformView.swift +++ b/Sources/PlatformView.swift @@ -26,30 +26,30 @@ protocol PlatformViewControllerRepresentable: _PlatformViewControllerRepresentab typealias ViewController = NSViewControllerType #endif - func makePlatformViewController(context: Context) -> ViewController - func updatePlatformViewController(_ controller: ViewController, context: Context) - static func dismantlePlatformViewController(_ controller: ViewController, coordinator: Coordinator) + @MainActor func makePlatformViewController(context: Context) -> ViewController + @MainActor func updatePlatformViewController(_ controller: ViewController, context: Context) + @MainActor static func dismantlePlatformViewController(_ controller: ViewController, coordinator: Coordinator) } extension PlatformViewControllerRepresentable { #if canImport(UIKit) - func makeUIViewController(context: Context) -> ViewController { + @MainActor func makeUIViewController(context: Context) -> ViewController { makePlatformViewController(context: context) } - func updateUIViewController(_ controller: ViewController, context: Context) { + @MainActor func updateUIViewController(_ controller: ViewController, context: Context) { updatePlatformViewController(controller, context: context) } - static func dismantleUIViewController(_ controller: ViewController, coordinator: Coordinator) { + @MainActor static func dismantleUIViewController(_ controller: ViewController, coordinator: Coordinator) { dismantlePlatformViewController(controller, coordinator: coordinator) } #elseif canImport(AppKit) - func makeNSViewController(context: Context) -> ViewController { + @MainActor func makeNSViewController(context: Context) -> ViewController { makePlatformViewController(context: context) } - func updateNSViewController(_ controller: ViewController, context: Context) { + @MainActor func updateNSViewController(_ controller: ViewController, context: Context) { updatePlatformViewController(controller, context: context) } - static func dismantleNSViewController(_ controller: ViewController, coordinator: Coordinator) { + @MainActor static func dismantleNSViewController(_ controller: ViewController, coordinator: Coordinator) { dismantlePlatformViewController(controller, coordinator: coordinator) } #endif diff --git a/Sources/PlatformViewVersion.swift b/Sources/PlatformViewVersion.swift index 310b4d31..f3b90ceb 100644 --- a/Sources/PlatformViewVersion.swift +++ b/Sources/PlatformViewVersion.swift @@ -1,6 +1,7 @@ #if !os(watchOS) import SwiftUI +@MainActor public struct PlatformViewVersionPredicate { let selector: IntrospectionSelector? @@ -94,6 +95,7 @@ public enum PlatformViewVersion? { if case .available(_, let selector) = self { return selector diff --git a/Sources/RuntimeWarnings.swift b/Sources/RuntimeWarnings.swift index bee24769..39682199 100644 --- a/Sources/RuntimeWarnings.swift +++ b/Sources/RuntimeWarnings.swift @@ -56,7 +56,7 @@ func runtimeWarn( // // Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc @usableFromInline - let dso = { () -> UnsafeMutableRawPointer in + nonisolated(unsafe) let dso = { () -> UnsafeMutableRawPointer in let count = _dyld_image_count() for i in 0.. { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index 3aa7f8dd..b001e933 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -55,35 +55,35 @@ public struct ColorPickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == ColorPickerType { - public static var colorPicker: Self { .init() } + @MainActor public static var colorPicker: Self { .init() } } #if canImport(UIKit) @available(iOS 14, *) extension iOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } @available(iOS 14, *) extension visionOSViewVersion { - public static let v1 = Self(for: .v1) + @MainActor public static let v1 = Self(for: .v1) } #elseif canImport(AppKit) @available(macOS 11, *) extension macOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self.unavailable() + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index 7ee07098..a93f6bc3 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -53,31 +53,31 @@ public struct DatePickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerType { - public static var datePicker: Self { .init() } + @MainActor public static var datePicker: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index c9023564..9c405890 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -55,41 +55,41 @@ import SwiftUI /// } /// ``` public struct DatePickerWithCompactStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case compact } } #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithCompactStyleType { - public static func datePicker(style: Self.Style) -> Self { .init() } + @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15") - public static let v10_15 = Self(for: .v10_15) - public static let v10_15_4 = Self(for: .v10_15_4) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v10_15_4 = Self(for: .v10_15_4) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index eaf416b6..b968ba5c 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -31,24 +31,24 @@ import SwiftUI /// /// Not available. public struct DatePickerWithFieldStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case field } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithFieldStyleType { - public static func datePicker(style: Self.Style) -> Self { .init() } + @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index 4c611554..09f840cc 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -55,39 +55,39 @@ import SwiftUI /// } /// ``` public struct DatePickerWithGraphicalStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case graphical } } #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType { - public static func datePicker(style: Self.Style) -> Self { .init() } + @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.graphical) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index da09d7c0..5d9cbb9b 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -31,24 +31,24 @@ import SwiftUI /// /// Not available. public struct DatePickerWithStepperFieldStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case stepperField } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleType { - public static func datePicker(style: Self.Style) -> Self { .init() } + @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index d0a59f4a..c494510d 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -43,29 +43,29 @@ import SwiftUI /// } /// ``` public struct DatePickerWithWheelStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case wheel } } #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == DatePickerWithWheelStyleType { - public static func datePicker(style: Self.Style) -> Self { .init() } + @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 92f3ffd7..9e41c5bd 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -64,34 +64,34 @@ public struct FormType: IntrospectableViewType {} #if !os(macOS) extension IntrospectableViewType where Self == FormType { - public static var form: Self { .init() } + @MainActor public static var form: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 88fc68e5..8f5ba750 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -75,57 +75,57 @@ import SwiftUI /// } /// ``` public struct FormWithGroupedStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case grouped } } extension IntrospectableViewType where Self == FormWithGroupedStyleType { - public static func form(style: Self.Style) -> Self { .init() } + @MainActor public static func form(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 15") - public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v15 = Self.unavailable() + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) + @MainActor public static let v1 = Self(for: .v1) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() + @MainActor public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 11") - public static let v11 = Self.unavailable() + @MainActor public static let v11 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 12") - public static let v12 = Self.unavailable() - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v12 = Self.unavailable() + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index e9a814d6..c25cbd1d 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -66,43 +66,43 @@ public struct FullScreenCoverType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == FullScreenCoverType { - public static var fullScreenCover: Self { .init() } + @MainActor public static var fullScreenCover: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".fullScreenCover isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) } } extension tvOSViewVersion { @available(*, unavailable, message: ".fullScreenCover isn't available on tvOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) } } diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index 9733f894..16aa5e25 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -74,50 +74,50 @@ import SwiftUI /// } /// ``` public struct ListType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case plain } } extension IntrospectableViewType where Self == ListType { - public static var list: Self { .init() } - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static var list: Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 3684e6b6..e3cfe23d 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -74,47 +74,47 @@ import SwiftUI /// } /// ``` public struct ListCellType: IntrospectableViewType { - public var scope: IntrospectionScope { .ancestor } + @MainActor public var scope: IntrospectionScope { .ancestor } } extension IntrospectableViewType where Self == ListCellType { - public static var listCell: Self { .init() } + @MainActor public static var listCell: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index c02bb525..1bc3fc4b 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -33,26 +33,26 @@ import SwiftUI /// /// Not available. public struct ListWithBorderedStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case bordered } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ListWithBorderedStyleType { - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() + @MainActor public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 11") - public static let v11 = Self.unavailable() - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v11 = Self.unavailable() + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index 0e7f1129..c69f6e03 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -64,41 +64,41 @@ import SwiftUI /// } /// ``` public struct ListWithGroupedStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case grouped } } #if !os(macOS) extension IntrospectableViewType where Self == ListWithGroupedStyleType { - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index d28e2e76..e3e6e10d 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -50,33 +50,33 @@ import SwiftUI /// } /// ``` public struct ListWithInsetGroupedStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case insetGrouped } } #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType { - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index 3e7d8856..dbf4aadb 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -64,43 +64,43 @@ import SwiftUI /// } /// ``` public struct ListWithInsetStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case inset } } #if !os(tvOS) extension IntrospectableViewType where Self == ListWithInsetStyleType { - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self.unavailable() + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index a6f411c0..7bdd982b 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -64,42 +64,42 @@ import SwiftUI /// } /// ``` public struct ListWithSidebarStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case sidebar } } #if !os(tvOS) extension IntrospectableViewType where Self == ListWithSidebarStyleType { - public static func list(style: Self.Style) -> Self { .init() } + @MainActor public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.sidebar) isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension iOSViewVersion { - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 0268895b..deaa84bb 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -68,41 +68,41 @@ public struct MapType: IntrospectableViewType {} import MapKit extension IntrospectableViewType where Self == MapType { - public static var map: Self { .init() } + @MainActor public static var map: Self { .init() } } extension iOSViewVersion { @available(*, unavailable, message: "Map isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) } extension tvOSViewVersion { @available(*, unavailable, message: "Map isn't available on tvOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension macOSViewVersion { @available(*, unavailable, message: "Map isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self.unavailable() + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index d972c21b..4f9a33a5 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -73,64 +73,64 @@ import SwiftUI public struct NavigationSplitViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationSplitViewType { - public static var navigationSplitView: Self { .init() } + @MainActor public static var navigationSplitView: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) } } extension tvOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) } } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() + @MainActor public static let v10_15 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 11") - public static let v11 = Self.unavailable() + @MainActor public static let v11 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 12") - public static let v12 = Self.unavailable() + @MainActor public static let v12 = Self.unavailable() - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index 382ffd2c..00fbda09 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -54,49 +54,49 @@ import SwiftUI public struct NavigationStackType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationStackType { - public static var navigationStack: Self { .init() } + @MainActor public static var navigationStack: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "NavigationStack isn't available on iOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on iOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on iOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension tvOSViewVersion { @available(*, unavailable, message: "NavigationStack isn't available on tvOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on tvOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on tvOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index be7aaaf4..0b534ce0 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -67,58 +67,58 @@ import SwiftUI /// } /// ``` public struct NavigationViewWithColumnsStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case columns } } extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleType { - public static func navigationView(style: Self.Style) -> Self { .init() } + @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) } } extension tvOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) } } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index baf3dff4..bec77d12 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -55,47 +55,47 @@ import SwiftUI /// } /// ``` public struct NavigationViewWithStackStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case stack } } extension IntrospectableViewType where Self == NavigationViewWithStackStyleType { - public static func navigationView(style: Self.Style) -> Self { .init() } + @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension tvOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) } } diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index a16304e5..fc0b34cf 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -60,33 +60,33 @@ import SwiftUI public struct PageControlType: IntrospectableViewType {} extension IntrospectableViewType where Self == PageControlType { - public static var pageControl: Self { .init() } + @MainActor public static var pageControl: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on tvOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 136d508f..ba484faa 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -35,25 +35,25 @@ import SwiftUI /// /// Not available. public struct PickerWithMenuStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case menu } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == PickerWithMenuStyleType { - public static func picker(style: Self.Style) -> Self { .init() } + @MainActor public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".pickerStyle(.menu) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self.unavailable() + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index 45f0f75f..c39678b6 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -83,46 +83,46 @@ import SwiftUI /// } /// ``` public struct PickerWithSegmentedStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case segmented } } extension IntrospectableViewType where Self == PickerWithSegmentedStyleType { - public static func picker(style: Self.Style) -> Self { .init() } + @MainActor public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index 8da83ce0..9859bf23 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -51,29 +51,29 @@ import SwiftUI /// } /// ``` public struct PickerWithWheelStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case wheel } } #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PickerWithWheelStyleType { - public static func picker(style: Self.Style) -> Self { .init() } + @MainActor public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 39f30bda..7415734c 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -52,28 +52,28 @@ public struct PopoverType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PopoverType { - public static var popover: Self { .init() } + @MainActor public static var popover: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.popoverPresentationController) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.popoverPresentationController) } } diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index bdf2521d..98fc8164 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -59,49 +59,49 @@ import SwiftUI /// } /// ``` public struct ProgressViewWithCircularStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case circular } } extension IntrospectableViewType where Self == ProgressViewWithCircularStyleType { - public static func progressView(style: Self.Style) -> Self { .init() } + @MainActor public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on tvOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on macOS 10.15") - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 559dbaf9..49fe69be 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -59,49 +59,49 @@ import SwiftUI /// } /// ``` public struct ProgressViewWithLinearStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case linear } } extension IntrospectableViewType where Self == ProgressViewWithLinearStyleType { - public static func progressView(style: Self.Style) -> Self { .init() } + @MainActor public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on iOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on tvOS 13") - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on macOS 10.15") - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index c449c7f4..879458fa 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -65,40 +65,40 @@ import SwiftUI public struct ScrollViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == ScrollViewType { - public static var scrollView: Self { .init() } + @MainActor public static var scrollView: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index ce7129ce..ffc23866 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -66,21 +66,21 @@ import SwiftUI public struct SearchFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SearchFieldType { - public static var searchField: Self { .init() } + @MainActor public static var searchField: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".searchable isn't available on iOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: ".searchable isn't available on iOS 14") - public static let v14 = Self.unavailable() - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v14 = Self.unavailable() + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -89,15 +89,15 @@ extension iOSViewVersion { extension tvOSViewVersion { @available(*, unavailable, message: ".searchable isn't available on tvOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: ".searchable isn't available on tvOS 14") - public static let v14 = Self.unavailable() - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v14 = Self.unavailable() + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -105,10 +105,10 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index f8d330c4..ad4fd181 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -65,40 +65,40 @@ import SwiftUI public struct SecureFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SecureFieldType { - public static var secureField: Self { .init() } + @MainActor public static var secureField: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index b3e6a859..b181a8d7 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -66,19 +66,19 @@ public struct SheetType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == SheetType { - public static var sheet: Self { .init() } + @MainActor public static var sheet: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) } } @@ -87,39 +87,39 @@ extension iOSViewVersion { @available(iOS 15, *) extension iOSViewVersion { @_disfavoredOverload - public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) @_disfavoredOverload - public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) @_disfavoredOverload - public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) @_disfavoredOverload - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.sheetPresentationController) } } @available(iOS 15, *) extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.sheetPresentationController) } } #endif extension tvOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) - private static var selector: IntrospectionSelector { + @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) } } diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index 34e283b8..ba79363e 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -44,26 +44,26 @@ public struct SliderType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == SliderType { - public static var slider: Self { .init() } + @MainActor public static var slider: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index 40e6dd1b..afefb01b 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -44,26 +44,26 @@ public struct StepperType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == StepperType { - public static var stepper: Self { .init() } + @MainActor public static var stepper: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index 850482f7..cb1d4aa3 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -58,43 +58,45 @@ public struct TabViewType: IntrospectableViewType {} #if !os(visionOS) extension IntrospectableViewType where Self == TabViewType { - public static var tabView: Self { .init() } + @MainActor public static var tabView: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.tabBarController) } } extension tvOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.tabBarController) } } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 8d567415..85c16370 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -58,40 +58,40 @@ import SwiftUI /// } /// ``` public struct TabViewWithPageStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case page } } #if !os(macOS) extension IntrospectableViewType where Self == TabViewWithPageStyleType { - public static func tabView(style: Self.Style) -> Self { .init() } + @MainActor public static func tabView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on tvOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index 4baee5ff..61a6357e 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -106,36 +106,36 @@ public struct TableType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TableType { - public static var table: Self { .init() } + @MainActor public static var table: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "Table isn't available on iOS 13") - public static let v13 = Self(for: .v13) + @MainActor public static let v13 = Self(for: .v13) @available(*, unavailable, message: "Table isn't available on iOS 14") - public static let v14 = Self(for: .v14) + @MainActor public static let v14 = Self(for: .v14) @available(*, unavailable, message: "Table isn't available on iOS 15") - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "Table isn't available on macOS 10.15") - public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v10_15 = Self(for: .v10_15) @available(*, unavailable, message: "Table isn't available on macOS 11") - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index d97ffcc8..f436b5a1 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -55,33 +55,33 @@ public struct TextEditorType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TextEditorType { - public static var textEditor: Self { .init() } + @MainActor public static var textEditor: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self.unavailable() + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 7abc2ac6..3e8b3ae5 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -65,40 +65,40 @@ import SwiftUI public struct TextFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == TextFieldType { - public static var textField: Self { .init() } + @MainActor public static var textField: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index a8501fb2..a2732dfc 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -63,13 +63,13 @@ import SwiftUI /// } /// ``` public struct TextFieldWithVerticalAxisType: IntrospectableViewType { - public enum Axis { + public enum Axis: Sendable { case vertical } } extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { - public static func textField(axis: Self.Axis) -> Self { .init() } + @MainActor public static func textField(axis: Self.Axis) -> Self { .init() } } // MARK: SwiftUI.TextField(..., axis: .vertical) - iOS @@ -77,46 +77,46 @@ extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 13") - public static let v13 = Self.unavailable() + @MainActor public static let v13 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 14") - public static let v14 = Self.unavailable() + @MainActor public static let v14 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 15") - public static let v15 = Self.unavailable() + @MainActor public static let v15 = Self.unavailable() - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() + @MainActor public static let v10_15 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 11") - public static let v11 = Self.unavailable() + @MainActor public static let v11 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 12") - public static let v12 = Self.unavailable() + @MainActor public static let v12 = Self.unavailable() - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index c8924a2d..01a1e26f 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -44,26 +44,26 @@ public struct ToggleType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleType { - public static var toggle: Self { .init() } + @MainActor public static var toggle: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 06f924d6..58c83b2a 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -31,26 +31,26 @@ import SwiftUI /// /// Not available. public struct ToggleWithButtonStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case button } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithButtonStyleType { - public static func toggle(style: Self.Style) -> Self { .init() } + @MainActor public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".toggleStyle(.button) isn't available on macOS 10.15") - public static let v10_15 = Self.unavailable() + @MainActor public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".toggleStyle(.button) isn't available on macOS 11") - public static let v11 = Self.unavailable() - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v11 = Self.unavailable() + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index bb077a19..1bde1a63 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -31,24 +31,24 @@ import SwiftUI /// /// Not available. public struct ToggleWithCheckboxStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case checkbox } } #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithCheckboxStyleType { - public static func toggle(style: Self.Style) -> Self { .init() } + @MainActor public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index 9b737212..237c9464 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -43,33 +43,33 @@ import SwiftUI /// /// Not available. public struct ToggleWithSwitchStyleType: IntrospectableViewType { - public enum Style { + public enum Style: Sendable { case `switch` } } #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithSwitchStyleType { - public static func toggle(style: Self.Style) -> Self { .init() } + @MainActor public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index be50449c..2d305baf 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -60,43 +60,43 @@ public struct VideoPlayerType: IntrospectableViewType {} import AVKit extension IntrospectableViewType where Self == VideoPlayerType { - public static var videoPlayer: Self { .init() } + @MainActor public static var videoPlayer: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on iOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on tvOS 13") - public static let v13 = Self.unavailable() - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self.unavailable() + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on macOS 10.15") - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/View.swift b/Sources/ViewTypes/View.swift index 02c99a66..3e4caaad 100644 --- a/Sources/ViewTypes/View.swift +++ b/Sources/ViewTypes/View.swift @@ -74,35 +74,35 @@ extension IntrospectableViewType where Self == ViewType { #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15) - public static let v11 = Self(for: .v11) - public static let v12 = Self(for: .v12) - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) + @MainActor public static let v10_15 = Self(for: .v10_15) + @MainActor public static let v11 = Self(for: .v11) + @MainActor public static let v12 = Self(for: .v12) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index 86c3941d..a6426710 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -69,31 +69,31 @@ public struct ViewControllerType: IntrospectableViewType { } extension IntrospectableViewType where Self == ViewControllerType { - public static var viewController: Self { .init() } + @MainActor public static var viewController: Self { .init() } } #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - public static let v13 = Self(for: .v13) - public static let v14 = Self(for: .v14) - public static let v15 = Self(for: .v15) - public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) - public static let v18 = Self(for: .v18) + @MainActor public static let v13 = Self(for: .v13) + @MainActor public static let v14 = Self(for: .v14) + @MainActor public static let v15 = Self(for: .v15) + @MainActor public static let v16 = Self(for: .v16) + @MainActor public static let v17 = Self(for: .v17) + @MainActor public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - public static let v1 = Self(for: .v1) - public static let v2 = Self(for: .v2) + @MainActor public static let v1 = Self(for: .v1) + @MainActor public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index e1203c81..e072a54e 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -62,48 +62,52 @@ extension IntrospectableViewType where Self == WindowType { #if canImport(UIKit) extension iOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) } } extension tvOSViewVersion { - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) - public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v16 = Self(for: .v16, selector: selector) + @MainActor public static let v17 = Self(for: .v17, selector: selector) + @MainActor public static let v18 = Self(for: .v18, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) } } extension visionOSViewVersion { - public static let v1 = Self(for: .v1, selector: selector) - public static let v2 = Self(for: .v2, selector: selector) + @MainActor public static let v1 = Self(for: .v1, selector: selector) + @MainActor public static let v2 = Self(for: .v2, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) } } #elseif canImport(AppKit) extension macOSViewVersion { - public static let v10_15 = Self(for: .v10_15, selector: selector) - public static let v11 = Self(for: .v11, selector: selector) - public static let v12 = Self(for: .v12, selector: selector) - public static let v13 = Self(for: .v13, selector: selector) - public static let v14 = Self(for: .v14, selector: selector) - public static let v15 = Self(for: .v15, selector: selector) + @MainActor public static let v10_15 = Self(for: .v10_15, selector: selector) + @MainActor public static let v11 = Self(for: .v11, selector: selector) + @MainActor public static let v12 = Self(for: .v12, selector: selector) + @MainActor public static let v13 = Self(for: .v13, selector: selector) + @MainActor public static let v14 = Self(for: .v14, selector: selector) + @MainActor public static let v15 = Self(for: .v15, selector: selector) + @MainActor private static var selector: IntrospectionSelector { .from(NSView.self, selector: \.window) } From b2f97b79d315ad8d42153fcccda4e561dc8757d6 Mon Sep 17 00:00:00 2001 From: Alexis Schultz Date: Fri, 12 Jul 2024 10:32:42 +0200 Subject: [PATCH 02/21] [Swift 6] Update Tests for Swift 6 --- Tests/Tests/PlatformVersionTests.swift | 6 ++++++ Tests/Tests/ViewTypes/ButtonTests.swift | 1 + Tests/Tests/ViewTypes/ColorPickerTests.swift | 1 + Tests/Tests/ViewTypes/DatePickerTests.swift | 1 + .../ViewTypes/DatePickerWithCompactFieldStyleTests.swift | 1 + Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift | 1 + .../Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift | 1 + .../ViewTypes/DatePickerWithStepperFieldStyleTests.swift | 1 + Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift | 1 + Tests/Tests/ViewTypes/FormTests.swift | 1 + Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift | 1 + Tests/Tests/ViewTypes/FullScreenCoverTests.swift | 2 ++ Tests/Tests/ViewTypes/ListCellTests.swift | 2 ++ Tests/Tests/ViewTypes/ListTests.swift | 3 +++ Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift | 1 + Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift | 1 + Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift | 1 + Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift | 1 + Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift | 1 + Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift | 1 + Tests/Tests/ViewTypes/MapTests.swift | 1 + Tests/Tests/ViewTypes/NavigationSplitViewTests.swift | 2 ++ Tests/Tests/ViewTypes/NavigationStackTests.swift | 2 ++ .../ViewTypes/NavigationViewWithColumnsStyleTests.swift | 2 ++ .../Tests/ViewTypes/NavigationViewWithStackStyleTests.swift | 2 ++ Tests/Tests/ViewTypes/PageControlTests.swift | 1 + Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift | 1 + Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift | 1 + Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift | 1 + Tests/Tests/ViewTypes/PopoverTests.swift | 2 ++ .../ViewTypes/ProgressViewWithCircularStyleTests.swift | 1 + .../Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift | 1 + Tests/Tests/ViewTypes/ScrollViewTests.swift | 3 +++ Tests/Tests/ViewTypes/SearchFieldTests.swift | 4 ++++ Tests/Tests/ViewTypes/SecureFieldTests.swift | 2 ++ Tests/Tests/ViewTypes/SheetTests.swift | 4 ++++ Tests/Tests/ViewTypes/SliderTests.swift | 1 + Tests/Tests/ViewTypes/StepperTests.swift | 1 + Tests/Tests/ViewTypes/TabViewTests.swift | 2 ++ Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift | 2 ++ Tests/Tests/ViewTypes/TableTests.swift | 3 +++ Tests/Tests/ViewTypes/TextEditorTests.swift | 1 + Tests/Tests/ViewTypes/TextFieldTests.swift | 2 ++ Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift | 1 + Tests/Tests/ViewTypes/ToggleTests.swift | 1 + Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift | 1 + Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift | 1 + Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift | 1 + Tests/Tests/ViewTypes/VideoPlayerTests.swift | 1 + Tests/Tests/ViewTypes/ViewControllerTests.swift | 1 + Tests/Tests/ViewTypes/ViewTests.swift | 1 + Tests/Tests/ViewTypes/WindowTests.swift | 1 + 52 files changed, 80 insertions(+) diff --git a/Tests/Tests/PlatformVersionTests.swift b/Tests/Tests/PlatformVersionTests.swift index 0b2e0169..14fbb92d 100644 --- a/Tests/Tests/PlatformVersionTests.swift +++ b/Tests/Tests/PlatformVersionTests.swift @@ -2,6 +2,7 @@ import XCTest final class PlatformVersionTests: XCTestCase { + @MainActor func test_iOS_isCurrent() { #if os(iOS) if #available(iOS 17, *) { @@ -44,6 +45,7 @@ final class PlatformVersionTests: XCTestCase { #endif } + @MainActor func test_iOS_isCurrentOrPast() { #if os(iOS) if #available(iOS 17, *) { @@ -86,6 +88,7 @@ final class PlatformVersionTests: XCTestCase { #endif } + @MainActor func test_macOS_isCurrent() { #if os(macOS) if #available(macOS 14, *) { @@ -128,6 +131,7 @@ final class PlatformVersionTests: XCTestCase { #endif } + @MainActor func test_macOS_isCurrentOrPast() { #if os(macOS) if #available(macOS 14, *) { @@ -170,6 +174,7 @@ final class PlatformVersionTests: XCTestCase { #endif } + @MainActor func test_tvOS_isCurrent() { #if os(tvOS) if #available(tvOS 17, *) { @@ -212,6 +217,7 @@ final class PlatformVersionTests: XCTestCase { #endif } + @MainActor func test_tvOS_isCurrentOrPast() { #if os(tvOS) if #available(tvOS 17, *) { diff --git a/Tests/Tests/ViewTypes/ButtonTests.swift b/Tests/Tests/ViewTypes/ButtonTests.swift index d07dcd96..77b56a36 100644 --- a/Tests/Tests/ViewTypes/ButtonTests.swift +++ b/Tests/Tests/ViewTypes/ButtonTests.swift @@ -8,6 +8,7 @@ final class ButtonTests: XCTestCase { typealias PlatformButton = NSButton #endif + @MainActor func testButton() { XCTAssertViewIntrospection(of: PlatformButton.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ColorPickerTests.swift b/Tests/Tests/ViewTypes/ColorPickerTests.swift index 25375eb6..c7e47f4e 100644 --- a/Tests/Tests/ViewTypes/ColorPickerTests.swift +++ b/Tests/Tests/ViewTypes/ColorPickerTests.swift @@ -13,6 +13,7 @@ final class ColorPickerTests: XCTestCase { typealias PlatformColorPicker = NSColorWell #endif + @MainActor func testColorPicker() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerTests.swift b/Tests/Tests/ViewTypes/DatePickerTests.swift index f105cd72..08e5555f 100644 --- a/Tests/Tests/ViewTypes/DatePickerTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerTests.swift @@ -10,6 +10,7 @@ final class DatePickerTests: XCTestCase { typealias PlatformDatePicker = NSDatePicker #endif + @MainActor func testDatePicker() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift index 6ac88b55..6166d655 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift @@ -11,6 +11,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { typealias PlatformDatePickerWithCompactStyle = NSDatePicker #endif + @MainActor func testDatePickerWithCompactStyle() throws { guard #available(iOS 14, macOS 10.15.4, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift index 630ceb47..768983cb 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift @@ -8,6 +8,7 @@ final class DatePickerWithFieldStyleTests: XCTestCase { typealias PlatformDatePickerWithFieldStyle = NSDatePicker #endif + @MainActor func testDatePickerWithFieldStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift index c4a4fbc3..38774cab 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift @@ -11,6 +11,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { typealias PlatformDatePickerWithGraphicalStyle = NSDatePicker #endif + @MainActor func testDatePickerWithGraphicalStyle() throws { guard #available(iOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift index b2005561..fe813f69 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift @@ -8,6 +8,7 @@ final class DatePickerWithStepperFieldStyleTests: XCTestCase { typealias PlatformDatePickerWithStepperFieldStyle = NSDatePicker #endif + @MainActor func testDatePickerWithStepperFieldStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift index 1f9df82a..3a13b088 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift @@ -8,6 +8,7 @@ final class DatePickerWithWheelStyleTests: XCTestCase { typealias PlatformDatePickerWithWheelStyle = UIDatePicker #endif + @MainActor func testDatePickerWithWheelStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/FormTests.swift b/Tests/Tests/ViewTypes/FormTests.swift index b6b5d852..ff821a89 100644 --- a/Tests/Tests/ViewTypes/FormTests.swift +++ b/Tests/Tests/ViewTypes/FormTests.swift @@ -10,6 +10,7 @@ final class FormTests: XCTestCase { typealias PlatformForm = NSScrollView #endif + @MainActor func testForm() throws { XCTAssertViewIntrospection(of: PlatformForm.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift index 90df9208..67169215 100644 --- a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift @@ -10,6 +10,7 @@ final class FormWithGroupedStyleTests: XCTestCase { typealias PlatformFormWithGroupedStyle = NSScrollView #endif + @MainActor func testFormWithGroupedStyle() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift index d5a2e675..57d87ab1 100644 --- a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift +++ b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift @@ -5,6 +5,8 @@ import XCTest @available(iOS 14, tvOS 14, *) final class FullScreenCoverTests: XCTestCase { + + @MainActor func testPresentationAsFullScreenCover() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListCellTests.swift b/Tests/Tests/ViewTypes/ListCellTests.swift index d6882abf..2a7bba85 100644 --- a/Tests/Tests/ViewTypes/ListCellTests.swift +++ b/Tests/Tests/ViewTypes/ListCellTests.swift @@ -9,6 +9,7 @@ final class ListCellTests: XCTestCase { typealias PlatformListCell = NSTableCellView #endif + @MainActor func testListCell() { XCTAssertViewIntrospection(of: PlatformListCell.self) { spies in let spy = spies[0] @@ -25,6 +26,7 @@ final class ListCellTests: XCTestCase { } } + @MainActor func testMaskedListCell() { XCTAssertViewIntrospection(of: PlatformListCell.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/ListTests.swift b/Tests/Tests/ViewTypes/ListTests.swift index 1b8da8f0..09c9b727 100644 --- a/Tests/Tests/ViewTypes/ListTests.swift +++ b/Tests/Tests/ViewTypes/ListTests.swift @@ -9,6 +9,7 @@ final class ListTests: XCTestCase { typealias PlatformList = NSTableView #endif + @MainActor func testList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] @@ -41,6 +42,7 @@ final class ListTests: XCTestCase { } #if !os(macOS) + @MainActor func testNestedList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] @@ -67,6 +69,7 @@ final class ListTests: XCTestCase { } #endif + @MainActor func testMaskedList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift index 357937c3..43c87547 100644 --- a/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift @@ -9,6 +9,7 @@ final class ListWithBorderedStyleTests: XCTestCase { typealias PlatformListWithBorderedStyle = NSTableView #endif + @MainActor func testListWithBorderedStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift index 16793db8..1f7f77d8 100644 --- a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift @@ -8,6 +8,7 @@ final class ListWithGroupedStyleTests: XCTestCase { typealias PlatformListWithGroupedStyle = UIScrollView // covers both UITableView and UICollectionView #endif + @MainActor func testListWithGroupedStyle() { XCTAssertViewIntrospection(of: PlatformListWithGroupedStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift index 23a539fa..1d2abfe5 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift @@ -9,6 +9,7 @@ final class ListWithInsetGroupedStyleTests: XCTestCase { typealias PlatformListWithInsetGroupedStyle = UIScrollView // covers both UITableView and UICollectionView #endif + @MainActor func testListWithInsetGroupedStyle() throws { guard #available(iOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift index 86e1746a..ee0efccf 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift @@ -11,6 +11,7 @@ final class ListWithInsetStyleTests: XCTestCase { typealias PlatformListWithInsetStyle = NSTableView #endif + @MainActor func testListWithInsetStyle() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift index 115a5a34..a7f99f66 100644 --- a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift @@ -9,6 +9,7 @@ final class ListWithPlainStyleTests: XCTestCase { typealias PlatformListWithPlainStyle = NSTableView #endif + @MainActor func testListWithPlainStyle() { XCTAssertViewIntrospection(of: PlatformListWithPlainStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift index c45d456f..355502f5 100644 --- a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift @@ -11,6 +11,7 @@ final class ListWithSidebarStyleTests: XCTestCase { typealias PlatformListWithSidebarStyle = NSTableView #endif + @MainActor func testListWithSidebarStyle() throws { guard #available(iOS 14, macOS 10.15, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/MapTests.swift b/Tests/Tests/ViewTypes/MapTests.swift index 2199b4cd..5d85a9b3 100644 --- a/Tests/Tests/ViewTypes/MapTests.swift +++ b/Tests/Tests/ViewTypes/MapTests.swift @@ -8,6 +8,7 @@ import XCTest final class MapTests: XCTestCase { typealias PlatformMap = MKMapView + @MainActor func testMap() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift index ac619ab0..43ed13e2 100644 --- a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift +++ b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift @@ -12,6 +12,7 @@ final class NavigationSplitViewTests: XCTestCase { typealias PlatformNavigationSplitView = NSSplitView #endif + @MainActor func testNavigationSplitView() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() @@ -41,6 +42,7 @@ final class NavigationSplitViewTests: XCTestCase { } } + @MainActor func testNavigationSplitViewAsAncestor() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationStackTests.swift b/Tests/Tests/ViewTypes/NavigationStackTests.swift index 579a6a0b..6caf401c 100644 --- a/Tests/Tests/ViewTypes/NavigationStackTests.swift +++ b/Tests/Tests/ViewTypes/NavigationStackTests.swift @@ -9,6 +9,7 @@ final class NavigationStackTests: XCTestCase { typealias PlatformNavigationStack = UINavigationController #endif + @MainActor func testNavigationStack() throws { guard #available(iOS 16, tvOS 16, *) else { throw XCTSkip() @@ -29,6 +30,7 @@ final class NavigationStackTests: XCTestCase { } } + @MainActor func testNavigationStackAsAncestor() throws { guard #available(iOS 16, tvOS 16, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift index a54edd7e..06a22e42 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift @@ -11,6 +11,7 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { typealias PlatformNavigationViewWithColumnsStyle = NSSplitView #endif + @MainActor func testNavigationViewWithColumnsStyle() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithColumnsStyle.self) { spies in let spy = spies[0] @@ -32,6 +33,7 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { } } + @MainActor func testNavigationViewWithColumnsStyleAsAncestor() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithColumnsStyle.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift index 36e2849b..e594d58e 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift @@ -8,6 +8,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { typealias PlatformNavigationViewWithStackStyle = UINavigationController #endif + @MainActor func testNavigationViewWithStackStyle() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithStackStyle.self) { spies in let spy = spies[0] @@ -25,6 +26,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { } } + @MainActor func testNavigationViewWithStackStyleAsAncestor() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithStackStyle.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/PageControlTests.swift b/Tests/Tests/ViewTypes/PageControlTests.swift index 3ef343e4..83dc6000 100644 --- a/Tests/Tests/ViewTypes/PageControlTests.swift +++ b/Tests/Tests/ViewTypes/PageControlTests.swift @@ -9,6 +9,7 @@ final class PageControlTests: XCTestCase { typealias PlatformPageControl = UIPageControl #endif + @MainActor func testPageControl() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift index c0c62962..554bb6b4 100644 --- a/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift @@ -8,6 +8,7 @@ final class PickerWithMenuStyleTests: XCTestCase { typealias PlatformPickerWithMenuStyle = NSPopUpButton #endif + @MainActor func testPickerWithMenuStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithMenuStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift index 54123e4e..b5ab2909 100644 --- a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift @@ -9,6 +9,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { typealias PlatformPickerWithSegmentedStyle = NSSegmentedControl #endif + @MainActor func testPickerWithSegmentedStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithSegmentedStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift index 8c05558e..f226ca77 100644 --- a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift @@ -8,6 +8,7 @@ final class PickerWithWheelStyleTests: XCTestCase { typealias PlatformPickerWithWheelStyle = UIPickerView #endif + @MainActor func testPickerWithWheelStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithWheelStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PopoverTests.swift b/Tests/Tests/ViewTypes/PopoverTests.swift index 7bc52dce..c294d8cd 100644 --- a/Tests/Tests/ViewTypes/PopoverTests.swift +++ b/Tests/Tests/ViewTypes/PopoverTests.swift @@ -4,6 +4,8 @@ import SwiftUIIntrospect import XCTest final class PopoverTests: XCTestCase { + + @MainActor func testPopover() throws { XCTAssertViewIntrospection(of: UIPopoverPresentationController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift index 4234c913..48932115 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift @@ -9,6 +9,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { typealias PlatformProgressViewWithCircularStyle = NSProgressIndicator #endif + @MainActor func testProgressViewWithCircularStyle() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift index 9dac3147..022ce6ec 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift @@ -9,6 +9,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { typealias PlatformProgressViewWithLinearStyle = NSProgressIndicator #endif + @MainActor func testProgressViewWithLinearStyle() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ScrollViewTests.swift b/Tests/Tests/ViewTypes/ScrollViewTests.swift index e5befb54..8b9a7139 100644 --- a/Tests/Tests/ViewTypes/ScrollViewTests.swift +++ b/Tests/Tests/ViewTypes/ScrollViewTests.swift @@ -9,6 +9,7 @@ final class ScrollViewTests: XCTestCase { typealias PlatformScrollView = NSScrollView #endif + @MainActor func testScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] @@ -49,6 +50,7 @@ final class ScrollViewTests: XCTestCase { } } + @MainActor func testNestedScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] @@ -87,6 +89,7 @@ final class ScrollViewTests: XCTestCase { } } + @MainActor func testMaskedScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SearchFieldTests.swift b/Tests/Tests/ViewTypes/SearchFieldTests.swift index bd69fae0..96271d24 100644 --- a/Tests/Tests/ViewTypes/SearchFieldTests.swift +++ b/Tests/Tests/ViewTypes/SearchFieldTests.swift @@ -9,6 +9,7 @@ final class SearchFieldTests: XCTestCase { typealias PlatformSearchField = UISearchBar #endif + @MainActor func testSearchFieldInNavigationStack() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -28,6 +29,7 @@ final class SearchFieldTests: XCTestCase { } } + @MainActor func testSearchFieldInNavigationStackAsAncestor() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -47,6 +49,7 @@ final class SearchFieldTests: XCTestCase { } } + @MainActor func testSearchFieldInNavigationSplitView() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -72,6 +75,7 @@ final class SearchFieldTests: XCTestCase { } } + @MainActor func testSearchFieldInNavigationSplitViewAsAncestor() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/SecureFieldTests.swift b/Tests/Tests/ViewTypes/SecureFieldTests.swift index 042c47de..1c7ce2ee 100644 --- a/Tests/Tests/ViewTypes/SecureFieldTests.swift +++ b/Tests/Tests/ViewTypes/SecureFieldTests.swift @@ -9,6 +9,7 @@ final class SecureFieldTests: XCTestCase { typealias PlatformSecureField = NSTextField #endif + @MainActor func testSecureField() { XCTAssertViewIntrospection(of: PlatformSecureField.self) { spies in let spy0 = spies[0] @@ -52,6 +53,7 @@ final class SecureFieldTests: XCTestCase { } } + @MainActor func testSecureFieldsEmbeddedInList() { XCTAssertViewIntrospection(of: PlatformSecureField.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SheetTests.swift b/Tests/Tests/ViewTypes/SheetTests.swift index cda888a7..d137ac96 100644 --- a/Tests/Tests/ViewTypes/SheetTests.swift +++ b/Tests/Tests/ViewTypes/SheetTests.swift @@ -5,6 +5,7 @@ import XCTest final class SheetTests: XCTestCase { #if os(iOS) + @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] @@ -21,6 +22,7 @@ final class SheetTests: XCTestCase { } } + @MainActor func testSheetAsSheetPresentationController() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -41,6 +43,7 @@ final class SheetTests: XCTestCase { } } #elseif os(tvOS) + @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] @@ -57,6 +60,7 @@ final class SheetTests: XCTestCase { } } #elseif os(visionOS) + @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SliderTests.swift b/Tests/Tests/ViewTypes/SliderTests.swift index db3200bb..ba021024 100644 --- a/Tests/Tests/ViewTypes/SliderTests.swift +++ b/Tests/Tests/ViewTypes/SliderTests.swift @@ -10,6 +10,7 @@ final class SliderTests: XCTestCase { typealias PlatformSlider = NSSlider #endif + @MainActor func testSlider() { XCTAssertViewIntrospection(of: PlatformSlider.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/StepperTests.swift b/Tests/Tests/ViewTypes/StepperTests.swift index e130f1de..194220bc 100644 --- a/Tests/Tests/ViewTypes/StepperTests.swift +++ b/Tests/Tests/ViewTypes/StepperTests.swift @@ -10,6 +10,7 @@ final class StepperTests: XCTestCase { typealias PlatformStepper = NSStepper #endif + @MainActor func testStepper() { XCTAssertViewIntrospection(of: PlatformStepper.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/TabViewTests.swift b/Tests/Tests/ViewTypes/TabViewTests.swift index 50b558e2..38ec3b14 100644 --- a/Tests/Tests/ViewTypes/TabViewTests.swift +++ b/Tests/Tests/ViewTypes/TabViewTests.swift @@ -10,6 +10,7 @@ final class TabViewTests: XCTestCase { typealias PlatformTabView = NSTabView #endif + @MainActor func testTabView() { XCTAssertViewIntrospection(of: PlatformTabView.self) { spies in let spy = spies[0] @@ -28,6 +29,7 @@ final class TabViewTests: XCTestCase { } } + @MainActor func testTabViewAsAncestor() { XCTAssertViewIntrospection(of: PlatformTabView.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift index d7bd8791..28e8f98f 100644 --- a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift +++ b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift @@ -9,6 +9,7 @@ final class TabViewWithPageStyleTests: XCTestCase { typealias PlatformTabViewWithPageStyle = UICollectionView #endif + @MainActor func testTabViewWithPageStyle() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() @@ -28,6 +29,7 @@ final class TabViewWithPageStyleTests: XCTestCase { } } + @MainActor func testTabViewWithPageStyleAsAncestor() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TableTests.swift b/Tests/Tests/ViewTypes/TableTests.swift index b30967c8..5ae42cc4 100644 --- a/Tests/Tests/ViewTypes/TableTests.swift +++ b/Tests/Tests/ViewTypes/TableTests.swift @@ -11,6 +11,7 @@ final class TableTests: XCTestCase { typealias PlatformTable = NSTableView #endif + @MainActor func testTable() throws { guard #available(iOS 16, macOS 12, *) else { throw XCTSkip() @@ -46,6 +47,7 @@ final class TableTests: XCTestCase { } } + @MainActor func testTableWithInsetStyle() throws { guard #available(iOS 16, macOS 12, *) else { throw XCTSkip() @@ -85,6 +87,7 @@ final class TableTests: XCTestCase { } #if os(macOS) + @MainActor func testTableWithBorderedStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TextEditorTests.swift b/Tests/Tests/ViewTypes/TextEditorTests.swift index 6eca638d..bc40f6a4 100644 --- a/Tests/Tests/ViewTypes/TextEditorTests.swift +++ b/Tests/Tests/ViewTypes/TextEditorTests.swift @@ -11,6 +11,7 @@ final class TextEditorTests: XCTestCase { typealias PlatformTextEditor = NSTextView #endif + @MainActor func testTextEditor() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TextFieldTests.swift b/Tests/Tests/ViewTypes/TextFieldTests.swift index 0e65c99a..f2e691eb 100644 --- a/Tests/Tests/ViewTypes/TextFieldTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldTests.swift @@ -9,6 +9,7 @@ final class TextFieldTests: XCTestCase { typealias PlatformTextField = NSTextField #endif + @MainActor func testTextField() { XCTAssertViewIntrospection(of: PlatformTextField.self) { spies in let spy0 = spies[0] @@ -52,6 +53,7 @@ final class TextFieldTests: XCTestCase { } } + @MainActor func testTextFieldsEmbeddedInList() { XCTAssertViewIntrospection(of: PlatformTextField.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift index f0bad5f5..e4bcd522 100644 --- a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift @@ -12,6 +12,7 @@ final class TextFieldWithVerticalAxisTests: XCTestCase { typealias PlatformTextField = NSTextField #endif + @MainActor func testTextFieldWithVerticalAxis() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ToggleTests.swift b/Tests/Tests/ViewTypes/ToggleTests.swift index fae82b4e..f141283f 100644 --- a/Tests/Tests/ViewTypes/ToggleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleTests.swift @@ -10,6 +10,7 @@ final class ToggleTests: XCTestCase { typealias PlatformToggle = NSButton #endif + @MainActor func testToggle() { XCTAssertViewIntrospection(of: PlatformToggle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift index b91d7857..ec75f000 100644 --- a/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift @@ -9,6 +9,7 @@ final class ToggleWithButtonStyleTests: XCTestCase { typealias PlatformToggleWithButtonStyle = NSButton #endif + @MainActor func testToggleWithButtonStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift index 0497518d..7e68cdfb 100644 --- a/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift @@ -8,6 +8,7 @@ final class ToggleWithCheckboxStyleTests: XCTestCase { typealias PlatformToggleWithCheckboxStyle = NSButton #endif + @MainActor func testToggleWithCheckboxStyle() throws { XCTAssertViewIntrospection(of: PlatformToggleWithCheckboxStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift index 8df51c45..f90b1590 100644 --- a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift @@ -10,6 +10,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { typealias PlatformToggleWithSwitchStyle = NSSwitch #endif + @MainActor func testToggleWithSwitchStyle() { XCTAssertViewIntrospection(of: PlatformToggleWithSwitchStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/VideoPlayerTests.swift b/Tests/Tests/ViewTypes/VideoPlayerTests.swift index 9658001e..c18443b4 100644 --- a/Tests/Tests/ViewTypes/VideoPlayerTests.swift +++ b/Tests/Tests/ViewTypes/VideoPlayerTests.swift @@ -12,6 +12,7 @@ final class VideoPlayerTests: XCTestCase { typealias PlatformVideoPlayer = AVPlayerView #endif + @MainActor func testVideoPlayer() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ViewControllerTests.swift b/Tests/Tests/ViewTypes/ViewControllerTests.swift index a0a7993b..e277d8ba 100644 --- a/Tests/Tests/ViewTypes/ViewControllerTests.swift +++ b/Tests/Tests/ViewTypes/ViewControllerTests.swift @@ -4,6 +4,7 @@ import SwiftUIIntrospect import XCTest final class ViewControllerTests: XCTestCase { + @MainActor func testViewController() { XCTAssertViewIntrospection(of: PlatformViewController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ViewTests.swift b/Tests/Tests/ViewTypes/ViewTests.swift index 1dcf065e..999fbe7f 100644 --- a/Tests/Tests/ViewTypes/ViewTests.swift +++ b/Tests/Tests/ViewTypes/ViewTests.swift @@ -3,6 +3,7 @@ import SwiftUIIntrospect import XCTest final class ViewTests: XCTestCase { + @MainActor func testView() { XCTAssertViewIntrospection(of: PlatformView.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/WindowTests.swift b/Tests/Tests/ViewTypes/WindowTests.swift index a6f43ab1..32c9c3c9 100644 --- a/Tests/Tests/ViewTypes/WindowTests.swift +++ b/Tests/Tests/ViewTypes/WindowTests.swift @@ -9,6 +9,7 @@ final class WindowTests: XCTestCase { typealias PlatformWindow = NSWindow #endif + @MainActor func testWindow() { XCTAssertViewIntrospection(of: PlatformWindow.self) { spies in let spy0 = spies[0] From c4625c2f167832757baae4b4abb99c864272b949 Mon Sep 17 00:00:00 2001 From: Alexis Schultz Date: Fri, 12 Jul 2024 10:36:13 +0200 Subject: [PATCH 03/21] [Swift 6] Update Package description for Swift 6 and 5 support in Xcode16 --- Package.swift | 5 +++-- Package@swift-5.7.swift | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 Package@swift-5.7.swift diff --git a/Package.swift b/Package.swift index c19540ef..e32bb114 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:6.0 import PackageDescription @@ -19,5 +19,6 @@ let package = Package( name: "SwiftUIIntrospect", path: "Sources" ), - ] + ], + swiftLanguageVersions: [.v5, .v6] ) diff --git a/Package@swift-5.7.swift b/Package@swift-5.7.swift new file mode 100644 index 00000000..c19540ef --- /dev/null +++ b/Package@swift-5.7.swift @@ -0,0 +1,23 @@ +// swift-tools-version:5.7 + +import PackageDescription + +let package = Package( + name: "swiftui-introspect", + platforms: [ + .iOS(.v13), + .tvOS(.v13), + .macOS(.v10_15), + ], + products: [ + .library(name: "SwiftUIIntrospect", targets: ["SwiftUIIntrospect"]), + .library(name: "SwiftUIIntrospect-Static", type: .static, targets: ["SwiftUIIntrospect"]), + .library(name: "SwiftUIIntrospect-Dynamic", type: .dynamic, targets: ["SwiftUIIntrospect"]), + ], + targets: [ + .target( + name: "SwiftUIIntrospect", + path: "Sources" + ), + ] +) From 57e2018e50f41351530762e788fb30c969f7e3d3 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:05:37 +0100 Subject: [PATCH 04/21] WIP --- Package.swift | 5 ++--- Package@swift-5.7.swift => Package@swift-6.0.swift | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename Package@swift-5.7.swift => Package@swift-6.0.swift (89%) diff --git a/Package.swift b/Package.swift index e32bb114..f1812b52 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.0 +// swift-tools-version:5.9 import PackageDescription @@ -19,6 +19,5 @@ let package = Package( name: "SwiftUIIntrospect", path: "Sources" ), - ], - swiftLanguageVersions: [.v5, .v6] + ] ) diff --git a/Package@swift-5.7.swift b/Package@swift-6.0.swift similarity index 89% rename from Package@swift-5.7.swift rename to Package@swift-6.0.swift index c19540ef..e32bb114 100644 --- a/Package@swift-5.7.swift +++ b/Package@swift-6.0.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:6.0 import PackageDescription @@ -19,5 +19,6 @@ let package = Package( name: "SwiftUIIntrospect", path: "Sources" ), - ] + ], + swiftLanguageVersions: [.v5, .v6] ) From deb8fb42a8e038519725cc403dea59ae1ab4dafc Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:08:00 +0100 Subject: [PATCH 05/21] WIP --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f1812b52..c19540ef 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.7 import PackageDescription From ef72b88d41ae7cfab6ac8c41f29f043fcae70490 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:36:41 +0100 Subject: [PATCH 06/21] WIP --- Sources/ViewTypes/Popover.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index fc60b795..26638168 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -74,7 +74,7 @@ extension visionOSViewVersion { @MainActor public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { - .from(UIViewController.self, selector: \.popoverPresentationController) + .from(UIViewController.self, selector: { $0.popoverPresentationController }) } } #endif From 29c0ecab6fae6e5d7d45da558904995943b7f526 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:40:40 +0100 Subject: [PATCH 07/21] WIP --- Package.swift | 4 ---- Package@swift-6.0.swift | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 83e453c3..c19540ef 100644 --- a/Package.swift +++ b/Package.swift @@ -19,9 +19,5 @@ let package = Package( name: "SwiftUIIntrospect", path: "Sources" ), - ], - swiftLanguageVersions: [ - .v5, - .version("6.0"), ] ) diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift index e32bb114..c348cd4a 100644 --- a/Package@swift-6.0.swift +++ b/Package@swift-6.0.swift @@ -20,5 +20,5 @@ let package = Package( path: "Sources" ), ], - swiftLanguageVersions: [.v5, .v6] + swiftLanguageVersions: [.v6] ) From ef13c870ba0e116e69a7015c55bfd6293bd94e88 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:45:41 +0100 Subject: [PATCH 08/21] add ci for ios 18 --- .github/workflows/ci.yml | 12 ++++++++++++ fastlane/Fastfile | 3 +++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f84d35e1..1c43b4d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,10 @@ jobs: runtime: iOS 17.5 os: macos-14 xcode: 15.4 + - platform: [iOS, 18] + runtime: iOS 18.0 + os: macos-14 + xcode: 16.0 - platform: [tvOS, 13] runtime: tvOS 13.4 @@ -92,6 +96,10 @@ jobs: runtime: tvOS 17.5 os: macos-14 xcode: 15.4 + - platform: [tvOS, 18] + runtime: tvOS 18.0 + os: macos-14 + xcode: 16.0 - platform: [watchOS, 8] runtime: watchOS 8.5 @@ -106,6 +114,10 @@ jobs: runtime: watchOS 10.5 os: macos-14 xcode: 15.4 + - platform: [watchOS, 11] + runtime: watchOS 11.0 + os: macos-14 + xcode: 16.0 - platform: [macOS, 12] runtime: macOS 12 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1b6032e0..776dd8f6 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -7,6 +7,7 @@ devices = { 15 => ["iPhone SE (3rd generation) (15.5)", "iPad Air (5th generation) (15.5)",], 16 => ["iPhone 14 (16.4)", "iPad Pro (11-inch) (4th generation) (16.4)"], 17 => ["iPhone 14 (17.5)", "iPad Pro (11-inch) (4th generation) (17.5)"], + 18 => ["iPhone 15 (18.0)", "iPad Pro 11-inch (M4) (18.0)"], }, "tvos" => { 13 => ["Apple TV (13.4)"], @@ -14,11 +15,13 @@ devices = { 15 => ["Apple TV (15.4)"], 16 => ["Apple TV (16.4)"], 17 => ["Apple TV (17.5)"], + 18 => ["Apple TV (18.0)"], }, "watchos" => { 8 => ["Apple Watch Series 7 (45mm) (8.5)"], 9 => ["Apple Watch Series 8 (45mm) (9.4)"], 10 => ["Apple Watch Series 9 (45mm) (10.5)"], + 11 => ["Apple Watch Series 9 (45mm) (11.0)"], }, "visionos" => { 1 => ["Apple Vision Pro (1.2)"], From bcec0d6695022582805afce211184c904e9e5baa Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:06:37 +0100 Subject: [PATCH 09/21] Revert "[Swift 6] Update Tests for Swift 6" This reverts commit b2f97b79d315ad8d42153fcccda4e561dc8757d6. --- Tests/Tests/PlatformVersionTests.swift | 6 ------ Tests/Tests/ViewTypes/ButtonTests.swift | 1 - Tests/Tests/ViewTypes/ColorPickerTests.swift | 1 - Tests/Tests/ViewTypes/DatePickerTests.swift | 1 - .../ViewTypes/DatePickerWithCompactFieldStyleTests.swift | 1 - Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift | 1 - .../Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift | 1 - .../ViewTypes/DatePickerWithStepperFieldStyleTests.swift | 1 - Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift | 1 - Tests/Tests/ViewTypes/FormTests.swift | 1 - Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift | 1 - Tests/Tests/ViewTypes/FullScreenCoverTests.swift | 2 -- Tests/Tests/ViewTypes/ListCellTests.swift | 2 -- Tests/Tests/ViewTypes/ListTests.swift | 3 --- Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift | 1 - Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift | 1 - Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift | 1 - Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift | 1 - Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift | 1 - Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift | 1 - Tests/Tests/ViewTypes/MapTests.swift | 1 - Tests/Tests/ViewTypes/NavigationSplitViewTests.swift | 2 -- Tests/Tests/ViewTypes/NavigationStackTests.swift | 2 -- .../ViewTypes/NavigationViewWithColumnsStyleTests.swift | 2 -- .../Tests/ViewTypes/NavigationViewWithStackStyleTests.swift | 2 -- Tests/Tests/ViewTypes/PageControlTests.swift | 1 - Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift | 1 - Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift | 1 - Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift | 1 - Tests/Tests/ViewTypes/PopoverTests.swift | 2 -- .../ViewTypes/ProgressViewWithCircularStyleTests.swift | 1 - .../Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift | 1 - Tests/Tests/ViewTypes/ScrollViewTests.swift | 3 --- Tests/Tests/ViewTypes/SearchFieldTests.swift | 4 ---- Tests/Tests/ViewTypes/SecureFieldTests.swift | 2 -- Tests/Tests/ViewTypes/SheetTests.swift | 4 ---- Tests/Tests/ViewTypes/SliderTests.swift | 1 - Tests/Tests/ViewTypes/StepperTests.swift | 1 - Tests/Tests/ViewTypes/TabViewTests.swift | 2 -- Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift | 2 -- Tests/Tests/ViewTypes/TableTests.swift | 3 --- Tests/Tests/ViewTypes/TextEditorTests.swift | 1 - Tests/Tests/ViewTypes/TextFieldTests.swift | 2 -- Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift | 1 - Tests/Tests/ViewTypes/ToggleTests.swift | 1 - Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift | 1 - Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift | 1 - Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift | 1 - Tests/Tests/ViewTypes/VideoPlayerTests.swift | 1 - Tests/Tests/ViewTypes/ViewControllerTests.swift | 1 - Tests/Tests/ViewTypes/ViewTests.swift | 1 - Tests/Tests/ViewTypes/WindowTests.swift | 1 - 52 files changed, 80 deletions(-) diff --git a/Tests/Tests/PlatformVersionTests.swift b/Tests/Tests/PlatformVersionTests.swift index 14fbb92d..0b2e0169 100644 --- a/Tests/Tests/PlatformVersionTests.swift +++ b/Tests/Tests/PlatformVersionTests.swift @@ -2,7 +2,6 @@ import XCTest final class PlatformVersionTests: XCTestCase { - @MainActor func test_iOS_isCurrent() { #if os(iOS) if #available(iOS 17, *) { @@ -45,7 +44,6 @@ final class PlatformVersionTests: XCTestCase { #endif } - @MainActor func test_iOS_isCurrentOrPast() { #if os(iOS) if #available(iOS 17, *) { @@ -88,7 +86,6 @@ final class PlatformVersionTests: XCTestCase { #endif } - @MainActor func test_macOS_isCurrent() { #if os(macOS) if #available(macOS 14, *) { @@ -131,7 +128,6 @@ final class PlatformVersionTests: XCTestCase { #endif } - @MainActor func test_macOS_isCurrentOrPast() { #if os(macOS) if #available(macOS 14, *) { @@ -174,7 +170,6 @@ final class PlatformVersionTests: XCTestCase { #endif } - @MainActor func test_tvOS_isCurrent() { #if os(tvOS) if #available(tvOS 17, *) { @@ -217,7 +212,6 @@ final class PlatformVersionTests: XCTestCase { #endif } - @MainActor func test_tvOS_isCurrentOrPast() { #if os(tvOS) if #available(tvOS 17, *) { diff --git a/Tests/Tests/ViewTypes/ButtonTests.swift b/Tests/Tests/ViewTypes/ButtonTests.swift index f3c61583..28dcd444 100644 --- a/Tests/Tests/ViewTypes/ButtonTests.swift +++ b/Tests/Tests/ViewTypes/ButtonTests.swift @@ -9,7 +9,6 @@ final class ButtonTests: XCTestCase { typealias PlatformButton = NSButton #endif - @MainActor func testButton() { XCTAssertViewIntrospection(of: PlatformButton.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ColorPickerTests.swift b/Tests/Tests/ViewTypes/ColorPickerTests.swift index 682a080f..f61bd4b9 100644 --- a/Tests/Tests/ViewTypes/ColorPickerTests.swift +++ b/Tests/Tests/ViewTypes/ColorPickerTests.swift @@ -14,7 +14,6 @@ final class ColorPickerTests: XCTestCase { typealias PlatformColorPicker = NSColorWell #endif - @MainActor func testColorPicker() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerTests.swift b/Tests/Tests/ViewTypes/DatePickerTests.swift index cd1c0a4a..1cdaf623 100644 --- a/Tests/Tests/ViewTypes/DatePickerTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerTests.swift @@ -11,7 +11,6 @@ final class DatePickerTests: XCTestCase { typealias PlatformDatePicker = NSDatePicker #endif - @MainActor func testDatePicker() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift index 7d90e729..3698f84b 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift @@ -12,7 +12,6 @@ final class DatePickerWithCompactStyleTests: XCTestCase { typealias PlatformDatePickerWithCompactStyle = NSDatePicker #endif - @MainActor func testDatePickerWithCompactStyle() throws { guard #available(iOS 14, macOS 10.15.4, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift index 83b9ee0b..e33f9b04 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithFieldStyleTests.swift @@ -9,7 +9,6 @@ final class DatePickerWithFieldStyleTests: XCTestCase { typealias PlatformDatePickerWithFieldStyle = NSDatePicker #endif - @MainActor func testDatePickerWithFieldStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift index 14150dc0..8aa62db4 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift @@ -12,7 +12,6 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { typealias PlatformDatePickerWithGraphicalStyle = NSDatePicker #endif - @MainActor func testDatePickerWithGraphicalStyle() throws { guard #available(iOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift index d36ec565..9b2a506d 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithStepperFieldStyleTests.swift @@ -9,7 +9,6 @@ final class DatePickerWithStepperFieldStyleTests: XCTestCase { typealias PlatformDatePickerWithStepperFieldStyle = NSDatePicker #endif - @MainActor func testDatePickerWithStepperFieldStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift index 1df9a8e1..ac1256f2 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift @@ -9,7 +9,6 @@ final class DatePickerWithWheelStyleTests: XCTestCase { typealias PlatformDatePickerWithWheelStyle = UIDatePicker #endif - @MainActor func testDatePickerWithWheelStyle() { let date0 = Date(timeIntervalSince1970: 0) let date1 = Date(timeIntervalSince1970: 5) diff --git a/Tests/Tests/ViewTypes/FormTests.swift b/Tests/Tests/ViewTypes/FormTests.swift index b1fc5c92..c6125c8b 100644 --- a/Tests/Tests/ViewTypes/FormTests.swift +++ b/Tests/Tests/ViewTypes/FormTests.swift @@ -11,7 +11,6 @@ final class FormTests: XCTestCase { typealias PlatformForm = NSScrollView #endif - @MainActor func testForm() throws { XCTAssertViewIntrospection(of: PlatformForm.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift index 77615c2a..d6fdef3b 100644 --- a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift @@ -11,7 +11,6 @@ final class FormWithGroupedStyleTests: XCTestCase { typealias PlatformFormWithGroupedStyle = NSScrollView #endif - @MainActor func testFormWithGroupedStyle() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift index ef47c751..66944199 100644 --- a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift +++ b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift @@ -6,8 +6,6 @@ import XCTest @available(iOS 14, tvOS 14, *) @MainActor final class FullScreenCoverTests: XCTestCase { - - @MainActor func testPresentationAsFullScreenCover() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListCellTests.swift b/Tests/Tests/ViewTypes/ListCellTests.swift index fcd9dfaa..2d4b65a9 100644 --- a/Tests/Tests/ViewTypes/ListCellTests.swift +++ b/Tests/Tests/ViewTypes/ListCellTests.swift @@ -10,7 +10,6 @@ final class ListCellTests: XCTestCase { typealias PlatformListCell = NSTableCellView #endif - @MainActor func testListCell() { XCTAssertViewIntrospection(of: PlatformListCell.self) { spies in let spy = spies[0] @@ -27,7 +26,6 @@ final class ListCellTests: XCTestCase { } } - @MainActor func testMaskedListCell() { XCTAssertViewIntrospection(of: PlatformListCell.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/ListTests.swift b/Tests/Tests/ViewTypes/ListTests.swift index dac4a092..fe722b93 100644 --- a/Tests/Tests/ViewTypes/ListTests.swift +++ b/Tests/Tests/ViewTypes/ListTests.swift @@ -10,7 +10,6 @@ final class ListTests: XCTestCase { typealias PlatformList = NSTableView #endif - @MainActor func testList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] @@ -43,7 +42,6 @@ final class ListTests: XCTestCase { } #if !os(macOS) - @MainActor func testNestedList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] @@ -70,7 +68,6 @@ final class ListTests: XCTestCase { } #endif - @MainActor func testMaskedList() { XCTAssertViewIntrospection(of: PlatformList.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift index 8ecae8da..98ddfb17 100644 --- a/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithBorderedStyleTests.swift @@ -10,7 +10,6 @@ final class ListWithBorderedStyleTests: XCTestCase { typealias PlatformListWithBorderedStyle = NSTableView #endif - @MainActor func testListWithBorderedStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift index fb53f0d2..5949ee45 100644 --- a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift @@ -9,7 +9,6 @@ final class ListWithGroupedStyleTests: XCTestCase { typealias PlatformListWithGroupedStyle = UIScrollView // covers both UITableView and UICollectionView #endif - @MainActor func testListWithGroupedStyle() { XCTAssertViewIntrospection(of: PlatformListWithGroupedStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift index c7802a91..12f6cd8f 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift @@ -10,7 +10,6 @@ final class ListWithInsetGroupedStyleTests: XCTestCase { typealias PlatformListWithInsetGroupedStyle = UIScrollView // covers both UITableView and UICollectionView #endif - @MainActor func testListWithInsetGroupedStyle() throws { guard #available(iOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift index 7100af78..db88d126 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift @@ -12,7 +12,6 @@ final class ListWithInsetStyleTests: XCTestCase { typealias PlatformListWithInsetStyle = NSTableView #endif - @MainActor func testListWithInsetStyle() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift index 18db01d0..1ad621f3 100644 --- a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift @@ -10,7 +10,6 @@ final class ListWithPlainStyleTests: XCTestCase { typealias PlatformListWithPlainStyle = NSTableView #endif - @MainActor func testListWithPlainStyle() { XCTAssertViewIntrospection(of: PlatformListWithPlainStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift index c4c5708d..43de00ef 100644 --- a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift @@ -12,7 +12,6 @@ final class ListWithSidebarStyleTests: XCTestCase { typealias PlatformListWithSidebarStyle = NSTableView #endif - @MainActor func testListWithSidebarStyle() throws { guard #available(iOS 14, macOS 10.15, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/MapTests.swift b/Tests/Tests/ViewTypes/MapTests.swift index 500bdf69..27032671 100644 --- a/Tests/Tests/ViewTypes/MapTests.swift +++ b/Tests/Tests/ViewTypes/MapTests.swift @@ -9,7 +9,6 @@ import XCTest final class MapTests: XCTestCase { typealias PlatformMap = MKMapView - @MainActor func testMap() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift index deec885f..391ebe9d 100644 --- a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift +++ b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift @@ -13,7 +13,6 @@ final class NavigationSplitViewTests: XCTestCase { typealias PlatformNavigationSplitView = NSSplitView #endif - @MainActor func testNavigationSplitView() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() @@ -43,7 +42,6 @@ final class NavigationSplitViewTests: XCTestCase { } } - @MainActor func testNavigationSplitViewAsAncestor() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationStackTests.swift b/Tests/Tests/ViewTypes/NavigationStackTests.swift index 8e1f78b7..9ed4ac0c 100644 --- a/Tests/Tests/ViewTypes/NavigationStackTests.swift +++ b/Tests/Tests/ViewTypes/NavigationStackTests.swift @@ -10,7 +10,6 @@ final class NavigationStackTests: XCTestCase { typealias PlatformNavigationStack = UINavigationController #endif - @MainActor func testNavigationStack() throws { guard #available(iOS 16, tvOS 16, *) else { throw XCTSkip() @@ -31,7 +30,6 @@ final class NavigationStackTests: XCTestCase { } } - @MainActor func testNavigationStackAsAncestor() throws { guard #available(iOS 16, tvOS 16, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift index d5b432b6..4a1ae555 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift @@ -12,7 +12,6 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { typealias PlatformNavigationViewWithColumnsStyle = NSSplitView #endif - @MainActor func testNavigationViewWithColumnsStyle() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithColumnsStyle.self) { spies in let spy = spies[0] @@ -34,7 +33,6 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { } } - @MainActor func testNavigationViewWithColumnsStyleAsAncestor() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithColumnsStyle.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift index 3ff2d99c..95ad9133 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift @@ -9,7 +9,6 @@ final class NavigationViewWithStackStyleTests: XCTestCase { typealias PlatformNavigationViewWithStackStyle = UINavigationController #endif - @MainActor func testNavigationViewWithStackStyle() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithStackStyle.self) { spies in let spy = spies[0] @@ -27,7 +26,6 @@ final class NavigationViewWithStackStyleTests: XCTestCase { } } - @MainActor func testNavigationViewWithStackStyleAsAncestor() { XCTAssertViewIntrospection(of: PlatformNavigationViewWithStackStyle.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/PageControlTests.swift b/Tests/Tests/ViewTypes/PageControlTests.swift index fd23828c..2b6aed8b 100644 --- a/Tests/Tests/ViewTypes/PageControlTests.swift +++ b/Tests/Tests/ViewTypes/PageControlTests.swift @@ -10,7 +10,6 @@ final class PageControlTests: XCTestCase { typealias PlatformPageControl = UIPageControl #endif - @MainActor func testPageControl() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift index 49c1551c..a7867271 100644 --- a/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithMenuStyleTests.swift @@ -9,7 +9,6 @@ final class PickerWithMenuStyleTests: XCTestCase { typealias PlatformPickerWithMenuStyle = NSPopUpButton #endif - @MainActor func testPickerWithMenuStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithMenuStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift index 2311d69b..109c27d3 100644 --- a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift @@ -10,7 +10,6 @@ final class PickerWithSegmentedStyleTests: XCTestCase { typealias PlatformPickerWithSegmentedStyle = NSSegmentedControl #endif - @MainActor func testPickerWithSegmentedStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithSegmentedStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift index 5f578428..10be27b9 100644 --- a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift @@ -9,7 +9,6 @@ final class PickerWithWheelStyleTests: XCTestCase { typealias PlatformPickerWithWheelStyle = UIPickerView #endif - @MainActor func testPickerWithWheelStyle() { XCTAssertViewIntrospection(of: PlatformPickerWithWheelStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/PopoverTests.swift b/Tests/Tests/ViewTypes/PopoverTests.swift index bdc03a6e..9b31e073 100644 --- a/Tests/Tests/ViewTypes/PopoverTests.swift +++ b/Tests/Tests/ViewTypes/PopoverTests.swift @@ -5,8 +5,6 @@ import XCTest @MainActor final class PopoverTests: XCTestCase { - - @MainActor func testPopover() throws { XCTAssertViewIntrospection(of: UIPopoverPresentationController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift index c22b41a7..b39448a4 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift @@ -10,7 +10,6 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { typealias PlatformProgressViewWithCircularStyle = NSProgressIndicator #endif - @MainActor func testProgressViewWithCircularStyle() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift index 8bb04b29..d6b889c2 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift @@ -10,7 +10,6 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { typealias PlatformProgressViewWithLinearStyle = NSProgressIndicator #endif - @MainActor func testProgressViewWithLinearStyle() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ScrollViewTests.swift b/Tests/Tests/ViewTypes/ScrollViewTests.swift index bce98420..caa9c6dc 100644 --- a/Tests/Tests/ViewTypes/ScrollViewTests.swift +++ b/Tests/Tests/ViewTypes/ScrollViewTests.swift @@ -10,7 +10,6 @@ final class ScrollViewTests: XCTestCase { typealias PlatformScrollView = NSScrollView #endif - @MainActor func testScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] @@ -51,7 +50,6 @@ final class ScrollViewTests: XCTestCase { } } - @MainActor func testNestedScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] @@ -90,7 +88,6 @@ final class ScrollViewTests: XCTestCase { } } - @MainActor func testMaskedScrollView() { XCTAssertViewIntrospection(of: PlatformScrollView.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SearchFieldTests.swift b/Tests/Tests/ViewTypes/SearchFieldTests.swift index ed88dba6..ce197d77 100644 --- a/Tests/Tests/ViewTypes/SearchFieldTests.swift +++ b/Tests/Tests/ViewTypes/SearchFieldTests.swift @@ -10,7 +10,6 @@ final class SearchFieldTests: XCTestCase { typealias PlatformSearchField = UISearchBar #endif - @MainActor func testSearchFieldInNavigationStack() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -30,7 +29,6 @@ final class SearchFieldTests: XCTestCase { } } - @MainActor func testSearchFieldInNavigationStackAsAncestor() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -50,7 +48,6 @@ final class SearchFieldTests: XCTestCase { } } - @MainActor func testSearchFieldInNavigationSplitView() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -76,7 +73,6 @@ final class SearchFieldTests: XCTestCase { } } - @MainActor func testSearchFieldInNavigationSplitViewAsAncestor() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/SecureFieldTests.swift b/Tests/Tests/ViewTypes/SecureFieldTests.swift index afd25fd2..bc2174d6 100644 --- a/Tests/Tests/ViewTypes/SecureFieldTests.swift +++ b/Tests/Tests/ViewTypes/SecureFieldTests.swift @@ -10,7 +10,6 @@ final class SecureFieldTests: XCTestCase { typealias PlatformSecureField = NSTextField #endif - @MainActor func testSecureField() { XCTAssertViewIntrospection(of: PlatformSecureField.self) { spies in let spy0 = spies[0] @@ -54,7 +53,6 @@ final class SecureFieldTests: XCTestCase { } } - @MainActor func testSecureFieldsEmbeddedInList() { XCTAssertViewIntrospection(of: PlatformSecureField.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SheetTests.swift b/Tests/Tests/ViewTypes/SheetTests.swift index 2c3e37cd..6607f96d 100644 --- a/Tests/Tests/ViewTypes/SheetTests.swift +++ b/Tests/Tests/ViewTypes/SheetTests.swift @@ -6,7 +6,6 @@ import XCTest @MainActor final class SheetTests: XCTestCase { #if os(iOS) - @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] @@ -23,7 +22,6 @@ final class SheetTests: XCTestCase { } } - @MainActor func testSheetAsSheetPresentationController() throws { guard #available(iOS 15, tvOS 15, *) else { throw XCTSkip() @@ -44,7 +42,6 @@ final class SheetTests: XCTestCase { } } #elseif os(tvOS) - @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] @@ -61,7 +58,6 @@ final class SheetTests: XCTestCase { } } #elseif os(visionOS) - @MainActor func testSheet() throws { XCTAssertViewIntrospection(of: UIPresentationController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/SliderTests.swift b/Tests/Tests/ViewTypes/SliderTests.swift index 7b33a05c..cb2c6e9e 100644 --- a/Tests/Tests/ViewTypes/SliderTests.swift +++ b/Tests/Tests/ViewTypes/SliderTests.swift @@ -11,7 +11,6 @@ final class SliderTests: XCTestCase { typealias PlatformSlider = NSSlider #endif - @MainActor func testSlider() { XCTAssertViewIntrospection(of: PlatformSlider.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/StepperTests.swift b/Tests/Tests/ViewTypes/StepperTests.swift index 661a71e2..bf36df46 100644 --- a/Tests/Tests/ViewTypes/StepperTests.swift +++ b/Tests/Tests/ViewTypes/StepperTests.swift @@ -11,7 +11,6 @@ final class StepperTests: XCTestCase { typealias PlatformStepper = NSStepper #endif - @MainActor func testStepper() { XCTAssertViewIntrospection(of: PlatformStepper.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/TabViewTests.swift b/Tests/Tests/ViewTypes/TabViewTests.swift index bed2ef18..45b8db7f 100644 --- a/Tests/Tests/ViewTypes/TabViewTests.swift +++ b/Tests/Tests/ViewTypes/TabViewTests.swift @@ -11,7 +11,6 @@ final class TabViewTests: XCTestCase { typealias PlatformTabView = NSTabView #endif - @MainActor func testTabView() { XCTAssertViewIntrospection(of: PlatformTabView.self) { spies in let spy = spies[0] @@ -30,7 +29,6 @@ final class TabViewTests: XCTestCase { } } - @MainActor func testTabViewAsAncestor() { XCTAssertViewIntrospection(of: PlatformTabView.self) { spies in let spy = spies[0] diff --git a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift index 3ad9d90a..3506ce46 100644 --- a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift +++ b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift @@ -10,7 +10,6 @@ final class TabViewWithPageStyleTests: XCTestCase { typealias PlatformTabViewWithPageStyle = UICollectionView #endif - @MainActor func testTabViewWithPageStyle() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() @@ -30,7 +29,6 @@ final class TabViewWithPageStyleTests: XCTestCase { } } - @MainActor func testTabViewWithPageStyleAsAncestor() throws { guard #available(iOS 14, tvOS 14, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TableTests.swift b/Tests/Tests/ViewTypes/TableTests.swift index 9708d58c..2c13fe18 100644 --- a/Tests/Tests/ViewTypes/TableTests.swift +++ b/Tests/Tests/ViewTypes/TableTests.swift @@ -12,7 +12,6 @@ final class TableTests: XCTestCase { typealias PlatformTable = NSTableView #endif - @MainActor func testTable() throws { guard #available(iOS 16, macOS 12, *) else { throw XCTSkip() @@ -48,7 +47,6 @@ final class TableTests: XCTestCase { } } - @MainActor func testTableWithInsetStyle() throws { guard #available(iOS 16, macOS 12, *) else { throw XCTSkip() @@ -88,7 +86,6 @@ final class TableTests: XCTestCase { } #if os(macOS) - @MainActor func testTableWithBorderedStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TextEditorTests.swift b/Tests/Tests/ViewTypes/TextEditorTests.swift index 117b7f8f..17469009 100644 --- a/Tests/Tests/ViewTypes/TextEditorTests.swift +++ b/Tests/Tests/ViewTypes/TextEditorTests.swift @@ -12,7 +12,6 @@ final class TextEditorTests: XCTestCase { typealias PlatformTextEditor = NSTextView #endif - @MainActor func testTextEditor() throws { guard #available(iOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/TextFieldTests.swift b/Tests/Tests/ViewTypes/TextFieldTests.swift index d69e5ec7..fde6895e 100644 --- a/Tests/Tests/ViewTypes/TextFieldTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldTests.swift @@ -10,7 +10,6 @@ final class TextFieldTests: XCTestCase { typealias PlatformTextField = NSTextField #endif - @MainActor func testTextField() { XCTAssertViewIntrospection(of: PlatformTextField.self) { spies in let spy0 = spies[0] @@ -54,7 +53,6 @@ final class TextFieldTests: XCTestCase { } } - @MainActor func testTextFieldsEmbeddedInList() { XCTAssertViewIntrospection(of: PlatformTextField.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift index 77e897c7..b124e832 100644 --- a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift @@ -13,7 +13,6 @@ final class TextFieldWithVerticalAxisTests: XCTestCase { typealias PlatformTextField = NSTextField #endif - @MainActor func testTextFieldWithVerticalAxis() throws { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ToggleTests.swift b/Tests/Tests/ViewTypes/ToggleTests.swift index 98e1c4aa..765d6ebb 100644 --- a/Tests/Tests/ViewTypes/ToggleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleTests.swift @@ -11,7 +11,6 @@ final class ToggleTests: XCTestCase { typealias PlatformToggle = NSButton #endif - @MainActor func testToggle() { XCTAssertViewIntrospection(of: PlatformToggle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift index 131536f9..257a5ba4 100644 --- a/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithButtonStyleTests.swift @@ -10,7 +10,6 @@ final class ToggleWithButtonStyleTests: XCTestCase { typealias PlatformToggleWithButtonStyle = NSButton #endif - @MainActor func testToggleWithButtonStyle() throws { guard #available(macOS 12, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift index c13b6aa4..499f2c07 100644 --- a/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithCheckboxStyleTests.swift @@ -9,7 +9,6 @@ final class ToggleWithCheckboxStyleTests: XCTestCase { typealias PlatformToggleWithCheckboxStyle = NSButton #endif - @MainActor func testToggleWithCheckboxStyle() throws { XCTAssertViewIntrospection(of: PlatformToggleWithCheckboxStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift index 2b1abf3d..6a3b7758 100644 --- a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift @@ -11,7 +11,6 @@ final class ToggleWithSwitchStyleTests: XCTestCase { typealias PlatformToggleWithSwitchStyle = NSSwitch #endif - @MainActor func testToggleWithSwitchStyle() { XCTAssertViewIntrospection(of: PlatformToggleWithSwitchStyle.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/VideoPlayerTests.swift b/Tests/Tests/ViewTypes/VideoPlayerTests.swift index 934738c2..c7019722 100644 --- a/Tests/Tests/ViewTypes/VideoPlayerTests.swift +++ b/Tests/Tests/ViewTypes/VideoPlayerTests.swift @@ -13,7 +13,6 @@ final class VideoPlayerTests: XCTestCase { typealias PlatformVideoPlayer = AVPlayerView #endif - @MainActor func testVideoPlayer() throws { guard #available(iOS 14, tvOS 14, macOS 11, *) else { throw XCTSkip() diff --git a/Tests/Tests/ViewTypes/ViewControllerTests.swift b/Tests/Tests/ViewTypes/ViewControllerTests.swift index 5f1fd87f..0f4d6d31 100644 --- a/Tests/Tests/ViewTypes/ViewControllerTests.swift +++ b/Tests/Tests/ViewTypes/ViewControllerTests.swift @@ -5,7 +5,6 @@ import XCTest @MainActor final class ViewControllerTests: XCTestCase { - @MainActor func testViewController() { XCTAssertViewIntrospection(of: PlatformViewController.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/ViewTests.swift b/Tests/Tests/ViewTypes/ViewTests.swift index 33a39507..b7457940 100644 --- a/Tests/Tests/ViewTypes/ViewTests.swift +++ b/Tests/Tests/ViewTypes/ViewTests.swift @@ -4,7 +4,6 @@ import XCTest @MainActor final class ViewTests: XCTestCase { - @MainActor func testView() { XCTAssertViewIntrospection(of: PlatformView.self) { spies in let spy0 = spies[0] diff --git a/Tests/Tests/ViewTypes/WindowTests.swift b/Tests/Tests/ViewTypes/WindowTests.swift index 1510ad05..cf474426 100644 --- a/Tests/Tests/ViewTypes/WindowTests.swift +++ b/Tests/Tests/ViewTypes/WindowTests.swift @@ -10,7 +10,6 @@ final class WindowTests: XCTestCase { typealias PlatformWindow = NSWindow #endif - @MainActor func testWindow() { XCTAssertViewIntrospection(of: PlatformWindow.self) { spies in let spy0 = spies[0] From 76dc7cdbc1f697e7058a10e902f41c69f18e0d83 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:12:09 +0100 Subject: [PATCH 10/21] WIP --- Sources/PlatformView.swift | 19 +++++---- Sources/PlatformViewVersion.swift | 5 ++- Sources/ViewTypes/Button.swift | 12 +++--- Sources/ViewTypes/ColorPicker.swift | 26 ++++++------ Sources/ViewTypes/DatePicker.swift | 28 ++++++------- .../DatePickerWithCompactStyle.swift | 30 +++++++------- .../ViewTypes/DatePickerWithFieldStyle.swift | 12 +++--- .../DatePickerWithGraphicalStyle.swift | 28 ++++++------- .../DatePickerWithStepperFieldStyle.swift | 12 +++--- .../ViewTypes/DatePickerWithWheelStyle.swift | 16 ++++---- Sources/ViewTypes/Form.swift | 28 ++++++------- Sources/ViewTypes/FormWithGroupedStyle.swift | 38 +++++++++--------- Sources/ViewTypes/FullScreenCover.swift | 28 ++++++------- Sources/ViewTypes/List.swift | 40 +++++++++---------- Sources/ViewTypes/ListCell.swift | 40 +++++++++---------- Sources/ViewTypes/ListWithBorderedStyle.swift | 12 +++--- Sources/ViewTypes/ListWithGroupedStyle.swift | 28 ++++++------- .../ViewTypes/ListWithInsetGroupedStyle.swift | 16 ++++---- Sources/ViewTypes/ListWithInsetStyle.swift | 28 ++++++------- Sources/ViewTypes/ListWithSidebarStyle.swift | 28 ++++++------- Sources/ViewTypes/Map.swift | 38 +++++++++--------- Sources/ViewTypes/NavigationSplitView.swift | 40 +++++++++---------- Sources/ViewTypes/NavigationStack.swift | 28 ++++++------- .../NavigationViewWithColumnsStyle.swift | 40 +++++++++---------- .../NavigationViewWithStackStyle.swift | 28 ++++++------- Sources/ViewTypes/PageControl.swift | 28 ++++++------- Sources/ViewTypes/PickerWithMenuStyle.swift | 12 +++--- .../ViewTypes/PickerWithSegmentedStyle.swift | 40 +++++++++---------- Sources/ViewTypes/PickerWithWheelStyle.swift | 16 ++++---- Sources/ViewTypes/Popover.swift | 16 ++++---- .../ProgressViewWithCircularStyle.swift | 40 +++++++++---------- .../ProgressViewWithLinearStyle.swift | 40 +++++++++---------- Sources/ViewTypes/ScrollView.swift | 40 +++++++++---------- Sources/ViewTypes/SearchField.swift | 28 ++++++------- Sources/ViewTypes/SecureField.swift | 40 +++++++++---------- Sources/ViewTypes/Sheet.swift | 36 ++++++++--------- Sources/ViewTypes/Slider.swift | 24 +++++------ Sources/ViewTypes/Stepper.swift | 24 +++++------ Sources/ViewTypes/TabView.swift | 36 ++++++++--------- Sources/ViewTypes/TabViewWithPageStyle.swift | 28 ++++++------- Sources/ViewTypes/Table.swift | 28 ++++++------- Sources/ViewTypes/TextEditor.swift | 28 ++++++------- Sources/ViewTypes/TextField.swift | 40 +++++++++---------- .../ViewTypes/TextFieldWithVerticalAxis.swift | 40 +++++++++---------- Sources/ViewTypes/Toggle.swift | 24 +++++------ Sources/ViewTypes/ToggleWithButtonStyle.swift | 12 +++--- .../ViewTypes/ToggleWithCheckboxStyle.swift | 12 +++--- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 24 +++++------ Sources/ViewTypes/VideoPlayer.swift | 40 +++++++++---------- Sources/ViewTypes/View.swift | 40 +++++++++---------- Sources/ViewTypes/ViewController.swift | 28 ++++++------- Sources/ViewTypes/Window.swift | 40 +++++++++---------- 52 files changed, 726 insertions(+), 726 deletions(-) diff --git a/Sources/PlatformView.swift b/Sources/PlatformView.swift index ddb15d51..045b47d6 100644 --- a/Sources/PlatformView.swift +++ b/Sources/PlatformView.swift @@ -19,7 +19,6 @@ typealias _PlatformViewControllerRepresentable = UIViewControllerRepresentable typealias _PlatformViewControllerRepresentable = NSViewControllerRepresentable #endif -@MainActor protocol PlatformViewControllerRepresentable: _PlatformViewControllerRepresentable { #if canImport(UIKit) typealias ViewController = UIViewControllerType @@ -27,30 +26,30 @@ protocol PlatformViewControllerRepresentable: _PlatformViewControllerRepresentab typealias ViewController = NSViewControllerType #endif - @MainActor func makePlatformViewController(context: Context) -> ViewController - @MainActor func updatePlatformViewController(_ controller: ViewController, context: Context) - @MainActor static func dismantlePlatformViewController(_ controller: ViewController, coordinator: Coordinator) + func makePlatformViewController(context: Context) -> ViewController + func updatePlatformViewController(_ controller: ViewController, context: Context) + static func dismantlePlatformViewController(_ controller: ViewController, coordinator: Coordinator) } extension PlatformViewControllerRepresentable { #if canImport(UIKit) - @MainActor func makeUIViewController(context: Context) -> ViewController { + func makeUIViewController(context: Context) -> ViewController { makePlatformViewController(context: context) } - @MainActor func updateUIViewController(_ controller: ViewController, context: Context) { + func updateUIViewController(_ controller: ViewController, context: Context) { updatePlatformViewController(controller, context: context) } - @MainActor static func dismantleUIViewController(_ controller: ViewController, coordinator: Coordinator) { + static func dismantleUIViewController(_ controller: ViewController, coordinator: Coordinator) { dismantlePlatformViewController(controller, coordinator: coordinator) } #elseif canImport(AppKit) - @MainActor func makeNSViewController(context: Context) -> ViewController { + func makeNSViewController(context: Context) -> ViewController { makePlatformViewController(context: context) } - @MainActor func updateNSViewController(_ controller: ViewController, context: Context) { + func updateNSViewController(_ controller: ViewController, context: Context) { updatePlatformViewController(controller, context: context) } - @MainActor static func dismantleNSViewController(_ controller: ViewController, coordinator: Coordinator) { + static func dismantleNSViewController(_ controller: ViewController, coordinator: Coordinator) { dismantlePlatformViewController(controller, coordinator: coordinator) } #endif diff --git a/Sources/PlatformViewVersion.swift b/Sources/PlatformViewVersion.swift index 7be31a24..5c78d5db 100644 --- a/Sources/PlatformViewVersion.swift +++ b/Sources/PlatformViewVersion.swift @@ -62,6 +62,7 @@ public typealias macOSViewVersion = PlatformViewVersion +@MainActor public enum PlatformViewVersion: Sendable { @_spi(Internals) case available(Version, IntrospectionSelector?) @_spi(Internals) case unavailable @@ -116,11 +117,11 @@ public enum PlatformViewVersion Bool { + nonisolated public static func == (lhs: Self, rhs: Self) -> Bool { true } - public static func < (lhs: Self, rhs: Self) -> Bool { + nonisolated public static func < (lhs: Self, rhs: Self) -> Bool { true } } diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index 87085190..5d0078f7 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -36,12 +36,12 @@ extension IntrospectableViewType where Self == ButtonType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index b001e933..b888c2ab 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -62,28 +62,28 @@ extension IntrospectableViewType where Self == ColorPickerType { @available(iOS 14, *) extension iOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } @available(iOS 14, *) extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) + public static let v1 = Self(for: .v1) } #elseif canImport(AppKit) @available(macOS 11, *) extension macOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self.unavailable() + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index a93f6bc3..bed3b4ca 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -58,26 +58,26 @@ extension IntrospectableViewType where Self == DatePickerType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 9c405890..3daf05f0 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -68,28 +68,28 @@ extension IntrospectableViewType where Self == DatePickerWithCompactStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v10_15_4 = Self(for: .v10_15_4) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v10_15_4 = Self(for: .v10_15_4) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index b968ba5c..ef376478 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -43,12 +43,12 @@ extension IntrospectableViewType where Self == DatePickerWithFieldStyleType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index 09f840cc..7c21ce4c 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -68,26 +68,26 @@ extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.graphical) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index 5d9cbb9b..13dc9aa6 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -43,12 +43,12 @@ extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleTy #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index c494510d..ebc5b983 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -55,17 +55,17 @@ extension IntrospectableViewType where Self == DatePickerWithWheelStyleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 9e41c5bd..12b4a276 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -69,29 +69,29 @@ extension IntrospectableViewType where Self == FormType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 8f5ba750..54f59f4b 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -87,45 +87,45 @@ extension IntrospectableViewType where Self == FormWithGroupedStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on tvOS 15") - @MainActor public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v15 = Self.unavailable() + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) + public static let v1 = Self(for: .v1) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() + public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 11") - @MainActor public static let v11 = Self.unavailable() + public static let v11 = Self.unavailable() @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 12") - @MainActor public static let v12 = Self.unavailable() - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v12 = Self.unavailable() + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index 41ed0b57..6e297185 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -72,12 +72,12 @@ extension IntrospectableViewType where Self == FullScreenCoverType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".fullScreenCover isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) @@ -86,12 +86,12 @@ extension iOSViewVersion { extension tvOSViewVersion { @available(*, unavailable, message: ".fullScreenCover isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) @@ -99,8 +99,8 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index 16aa5e25..9ee6d7ac 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -86,38 +86,38 @@ extension IntrospectableViewType where Self == ListType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index e3cfe23d..7d40fa12 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -83,38 +83,38 @@ extension IntrospectableViewType where Self == ListCellType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index 1bc3fc4b..ab8a7306 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -46,13 +46,13 @@ extension IntrospectableViewType where Self == ListWithBorderedStyleType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() + public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 11") - @MainActor public static let v11 = Self.unavailable() - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v11 = Self.unavailable() + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index c69f6e03..fb041297 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -76,29 +76,29 @@ extension IntrospectableViewType where Self == ListWithGroupedStyleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index e3e6e10d..5bc535fb 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -63,20 +63,20 @@ extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index dbf4aadb..88058fec 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -77,30 +77,30 @@ extension IntrospectableViewType where Self == ListWithInsetStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self.unavailable() + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index 7bdd982b..1557d95a 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -77,29 +77,29 @@ extension IntrospectableViewType where Self == ListWithSidebarStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.sidebar) isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension iOSViewVersion { - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index deaa84bb..97d0f849 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -73,36 +73,36 @@ extension IntrospectableViewType where Self == MapType { extension iOSViewVersion { @available(*, unavailable, message: "Map isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) } extension tvOSViewVersion { @available(*, unavailable, message: "Map isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension macOSViewVersion { @available(*, unavailable, message: "Map isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self.unavailable() + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 8835a580..7a125144 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -79,15 +79,15 @@ extension IntrospectableViewType where Self == NavigationSplitViewType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } @@ -96,15 +96,15 @@ extension iOSViewVersion { extension tvOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -112,8 +112,8 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } @@ -122,15 +122,15 @@ extension visionOSViewVersion { #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() + public static let v10_15 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 11") - @MainActor public static let v11 = Self.unavailable() + public static let v11 = Self.unavailable() @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 12") - @MainActor public static let v12 = Self.unavailable() + public static let v12 = Self.unavailable() - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index ff46d17f..07e9fe09 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -60,15 +60,15 @@ extension IntrospectableViewType where Self == NavigationStackType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "NavigationStack isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on iOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on iOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -77,15 +77,15 @@ extension iOSViewVersion { extension tvOSViewVersion { @available(*, unavailable, message: "NavigationStack isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on tvOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "NavigationStack isn't available on tvOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -93,8 +93,8 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index 5413bb2b..a4eef396 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -78,12 +78,12 @@ extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleTyp #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } @@ -91,12 +91,12 @@ extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -104,8 +104,8 @@ extension tvOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } @@ -113,12 +113,12 @@ extension visionOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index 919d7ed9..ff47def3 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -66,12 +66,12 @@ extension IntrospectableViewType where Self == NavigationViewWithStackStyleType #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -79,12 +79,12 @@ extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } @@ -92,8 +92,8 @@ extension tvOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index fc0b34cf..1ae4b77c 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -66,27 +66,27 @@ extension IntrospectableViewType where Self == PageControlType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on tvOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index ba484faa..0e946212 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -48,12 +48,12 @@ extension IntrospectableViewType where Self == PickerWithMenuStyleType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".pickerStyle(.menu) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self.unavailable() + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index c39678b6..4eddbb9c 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -94,35 +94,35 @@ extension IntrospectableViewType where Self == PickerWithSegmentedStyleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index 9859bf23..a5527356 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -63,17 +63,17 @@ extension IntrospectableViewType where Self == PickerWithWheelStyleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 26638168..45f3e771 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -57,12 +57,12 @@ extension IntrospectableViewType where Self == PopoverType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) @@ -70,8 +70,8 @@ extension iOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index 98fc8164..57cceb3b 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -71,37 +71,37 @@ extension IntrospectableViewType where Self == ProgressViewWithCircularStyleType #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on tvOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 49fe69be..4d529a01 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -71,37 +71,37 @@ extension IntrospectableViewType where Self == ProgressViewWithLinearStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on tvOS 13") - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index 879458fa..89f69be5 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -70,35 +70,35 @@ extension IntrospectableViewType where Self == ScrollViewType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index ffc23866..05b7f666 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -72,13 +72,13 @@ extension IntrospectableViewType where Self == SearchFieldType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".searchable isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: ".searchable isn't available on iOS 14") - @MainActor public static let v14 = Self.unavailable() - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v14 = Self.unavailable() + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { @@ -89,13 +89,13 @@ extension iOSViewVersion { extension tvOSViewVersion { @available(*, unavailable, message: ".searchable isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: ".searchable isn't available on tvOS 14") - @MainActor public static let v14 = Self.unavailable() - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v14 = Self.unavailable() + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { @@ -105,8 +105,8 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UINavigationController.self) { diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index ad4fd181..8fa8a565 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -70,35 +70,35 @@ extension IntrospectableViewType where Self == SecureFieldType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index cb2a6e0a..b99aa576 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -71,12 +71,12 @@ extension IntrospectableViewType where Self == SheetType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) @@ -87,13 +87,13 @@ extension iOSViewVersion { @available(iOS 15, *) extension iOSViewVersion { @_disfavoredOverload - @MainActor public static let v15 = Self(for: .v15, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) @_disfavoredOverload - @MainActor public static let v16 = Self(for: .v16, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) @_disfavoredOverload - @MainActor public static let v17 = Self(for: .v17, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) @_disfavoredOverload - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) @@ -102,8 +102,8 @@ extension iOSViewVersion { @available(iOS 15, *) extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) @@ -112,12 +112,12 @@ extension visionOSViewVersion { #endif extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index ba79363e..7cc09183 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -49,21 +49,21 @@ extension IntrospectableViewType where Self == SliderType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index afefb01b..3379d6bc 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -49,21 +49,21 @@ extension IntrospectableViewType where Self == StepperType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index 0908fab5..cf8b9bfa 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -63,12 +63,12 @@ extension IntrospectableViewType where Self == TabViewType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { @@ -77,12 +77,12 @@ extension iOSViewVersion { } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { @@ -91,12 +91,12 @@ extension tvOSViewVersion { } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 85c16370..1dfc5d1e 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -71,27 +71,27 @@ extension IntrospectableViewType where Self == TabViewWithPageStyleType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index 61a6357e..756ef7bf 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -112,30 +112,30 @@ extension IntrospectableViewType where Self == TableType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "Table isn't available on iOS 13") - @MainActor public static let v13 = Self(for: .v13) + public static let v13 = Self(for: .v13) @available(*, unavailable, message: "Table isn't available on iOS 14") - @MainActor public static let v14 = Self(for: .v14) + public static let v14 = Self(for: .v14) @available(*, unavailable, message: "Table isn't available on iOS 15") - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "Table isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self(for: .v10_15) + public static let v10_15 = Self(for: .v10_15) @available(*, unavailable, message: "Table isn't available on macOS 11") - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index f436b5a1..760fe11d 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -61,27 +61,27 @@ extension IntrospectableViewType where Self == TextEditorType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self.unavailable() + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 3e8b3ae5..76f90caf 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -70,35 +70,35 @@ extension IntrospectableViewType where Self == TextFieldType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index a2732dfc..2d9478dd 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -77,46 +77,46 @@ extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() + public static let v13 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 14") - @MainActor public static let v14 = Self.unavailable() + public static let v14 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on tvOS 15") - @MainActor public static let v15 = Self.unavailable() + public static let v15 = Self.unavailable() - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() + public static let v10_15 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 11") - @MainActor public static let v11 = Self.unavailable() + public static let v11 = Self.unavailable() @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 12") - @MainActor public static let v12 = Self.unavailable() + public static let v12 = Self.unavailable() - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index 01a1e26f..0914722c 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -49,21 +49,21 @@ extension IntrospectableViewType where Self == ToggleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 58c83b2a..83d34018 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -44,13 +44,13 @@ extension IntrospectableViewType where Self == ToggleWithButtonStyleType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @available(*, unavailable, message: ".toggleStyle(.button) isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self.unavailable() + public static let v10_15 = Self.unavailable() @available(*, unavailable, message: ".toggleStyle(.button) isn't available on macOS 11") - @MainActor public static let v11 = Self.unavailable() - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v11 = Self.unavailable() + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index 1bde1a63..ea1d5f48 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -43,12 +43,12 @@ extension IntrospectableViewType where Self == ToggleWithCheckboxStyleType { #if canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index 237c9464..c76221b3 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -55,21 +55,21 @@ extension IntrospectableViewType where Self == ToggleWithSwitchStyleType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index 2d305baf..e43ae6de 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -66,37 +66,37 @@ extension IntrospectableViewType where Self == VideoPlayerType { #if canImport(UIKit) extension iOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on iOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on tvOS 13") - @MainActor public static let v13 = Self.unavailable() - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self.unavailable() + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @available(*, unavailable, message: "VideoPlayer isn't available on macOS 10.15") - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/View.swift b/Sources/ViewTypes/View.swift index 3e4caaad..02c99a66 100644 --- a/Sources/ViewTypes/View.swift +++ b/Sources/ViewTypes/View.swift @@ -74,35 +74,35 @@ extension IntrospectableViewType where Self == ViewType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15) - @MainActor public static let v11 = Self(for: .v11) - @MainActor public static let v12 = Self(for: .v12) - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) + public static let v10_15 = Self(for: .v10_15) + public static let v11 = Self(for: .v11) + public static let v12 = Self(for: .v12) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index a6426710..76ce2db3 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -74,26 +74,26 @@ extension IntrospectableViewType where Self == ViewControllerType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13) - @MainActor public static let v14 = Self(for: .v14) - @MainActor public static let v15 = Self(for: .v15) - @MainActor public static let v16 = Self(for: .v16) - @MainActor public static let v17 = Self(for: .v17) - @MainActor public static let v18 = Self(for: .v18) + public static let v13 = Self(for: .v13) + public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) + public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1) - @MainActor public static let v2 = Self(for: .v2) + public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index c7b17a46..715643d5 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -62,12 +62,12 @@ extension IntrospectableViewType where Self == WindowType { #if canImport(UIKit) extension iOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { @@ -76,12 +76,12 @@ extension iOSViewVersion { } extension tvOSViewVersion { - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) - @MainActor public static let v16 = Self(for: .v16, selector: selector) - @MainActor public static let v17 = Self(for: .v17, selector: selector) - @MainActor public static let v18 = Self(for: .v18, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) + public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) @MainActor private static var selector: IntrospectionSelector { @@ -90,8 +90,8 @@ extension tvOSViewVersion { } extension visionOSViewVersion { - @MainActor public static let v1 = Self(for: .v1, selector: selector) - @MainActor public static let v2 = Self(for: .v2, selector: selector) + public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) @MainActor private static var selector: IntrospectionSelector { @@ -100,12 +100,12 @@ extension visionOSViewVersion { } #elseif canImport(AppKit) extension macOSViewVersion { - @MainActor public static let v10_15 = Self(for: .v10_15, selector: selector) - @MainActor public static let v11 = Self(for: .v11, selector: selector) - @MainActor public static let v12 = Self(for: .v12, selector: selector) - @MainActor public static let v13 = Self(for: .v13, selector: selector) - @MainActor public static let v14 = Self(for: .v14, selector: selector) - @MainActor public static let v15 = Self(for: .v15, selector: selector) + public static let v10_15 = Self(for: .v10_15, selector: selector) + public static let v11 = Self(for: .v11, selector: selector) + public static let v12 = Self(for: .v12, selector: selector) + public static let v13 = Self(for: .v13, selector: selector) + public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) @MainActor private static var selector: IntrospectionSelector { From 3b2ba6506bde955b6315d1db28daa3b5f4fc9a4d Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:14:06 +0100 Subject: [PATCH 11/21] WIP --- Sources/ViewTypes/Button.swift | 2 +- Sources/ViewTypes/ColorPicker.swift | 2 +- Sources/ViewTypes/DatePicker.swift | 2 +- Sources/ViewTypes/DatePickerWithCompactStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithFieldStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithGraphicalStyle.swift | 2 +- .../ViewTypes/DatePickerWithStepperFieldStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithWheelStyle.swift | 2 +- Sources/ViewTypes/Form.swift | 2 +- Sources/ViewTypes/FormWithGroupedStyle.swift | 2 +- Sources/ViewTypes/FullScreenCover.swift | 8 ++++---- Sources/ViewTypes/List.swift | 4 ++-- Sources/ViewTypes/ListCell.swift | 2 +- Sources/ViewTypes/ListWithBorderedStyle.swift | 2 +- Sources/ViewTypes/ListWithGroupedStyle.swift | 2 +- Sources/ViewTypes/ListWithInsetGroupedStyle.swift | 2 +- Sources/ViewTypes/ListWithInsetStyle.swift | 2 +- Sources/ViewTypes/ListWithSidebarStyle.swift | 2 +- Sources/ViewTypes/Map.swift | 2 +- Sources/ViewTypes/NavigationSplitView.swift | 8 ++++---- Sources/ViewTypes/NavigationStack.swift | 8 ++++---- Sources/ViewTypes/NavigationViewWithColumnsStyle.swift | 8 ++++---- Sources/ViewTypes/NavigationViewWithStackStyle.swift | 8 ++++---- Sources/ViewTypes/PageControl.swift | 2 +- Sources/ViewTypes/PickerWithMenuStyle.swift | 2 +- Sources/ViewTypes/PickerWithSegmentedStyle.swift | 2 +- Sources/ViewTypes/PickerWithWheelStyle.swift | 2 +- Sources/ViewTypes/Popover.swift | 6 +++--- Sources/ViewTypes/ProgressViewWithCircularStyle.swift | 2 +- Sources/ViewTypes/ProgressViewWithLinearStyle.swift | 2 +- Sources/ViewTypes/ScrollView.swift | 2 +- Sources/ViewTypes/SearchField.swift | 8 ++++---- Sources/ViewTypes/SecureField.swift | 2 +- Sources/ViewTypes/Sheet.swift | 10 +++++----- Sources/ViewTypes/Slider.swift | 2 +- Sources/ViewTypes/Stepper.swift | 2 +- Sources/ViewTypes/TabView.swift | 2 +- Sources/ViewTypes/TabViewWithPageStyle.swift | 2 +- Sources/ViewTypes/Table.swift | 2 +- Sources/ViewTypes/TextEditor.swift | 2 +- Sources/ViewTypes/TextField.swift | 2 +- Sources/ViewTypes/TextFieldWithVerticalAxis.swift | 2 +- Sources/ViewTypes/Toggle.swift | 2 +- Sources/ViewTypes/ToggleWithButtonStyle.swift | 2 +- Sources/ViewTypes/ToggleWithCheckboxStyle.swift | 2 +- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 2 +- Sources/ViewTypes/VideoPlayer.swift | 2 +- Sources/ViewTypes/ViewController.swift | 2 +- 48 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index 5d0078f7..aa8a591a 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -31,7 +31,7 @@ public struct ButtonType: IntrospectableViewType {} #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ButtonType { - @MainActor public static var button: Self { .init() } + public static var button: Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index b888c2ab..3aa7f8dd 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -55,7 +55,7 @@ public struct ColorPickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == ColorPickerType { - @MainActor public static var colorPicker: Self { .init() } + public static var colorPicker: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index bed3b4ca..7ee07098 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -53,7 +53,7 @@ public struct DatePickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerType { - @MainActor public static var datePicker: Self { .init() } + public static var datePicker: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 3daf05f0..4472ac47 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -62,7 +62,7 @@ public struct DatePickerWithCompactStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithCompactStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index ef376478..052b6137 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -38,7 +38,7 @@ public struct DatePickerWithFieldStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithFieldStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index 7c21ce4c..fe752533 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -62,7 +62,7 @@ public struct DatePickerWithGraphicalStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index 13dc9aa6..abc4e2fe 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -38,7 +38,7 @@ public struct DatePickerWithStepperFieldStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index ebc5b983..4b20e03a 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -50,7 +50,7 @@ public struct DatePickerWithWheelStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == DatePickerWithWheelStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 12b4a276..92f3ffd7 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -64,7 +64,7 @@ public struct FormType: IntrospectableViewType {} #if !os(macOS) extension IntrospectableViewType where Self == FormType { - @MainActor public static var form: Self { .init() } + public static var form: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 54f59f4b..374d2a02 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -81,7 +81,7 @@ public struct FormWithGroupedStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == FormWithGroupedStyleType { - @MainActor public static func form(style: Self.Style) -> Self { .init() } + public static func form(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index 6e297185..2e122a9a 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -66,7 +66,7 @@ public struct FullScreenCoverType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == FullScreenCoverType { - @MainActor public static var fullScreenCover: Self { .init() } + public static var fullScreenCover: Self { .init() } } #if canImport(UIKit) @@ -79,7 +79,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -93,7 +93,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -102,7 +102,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index 9ee6d7ac..e623746f 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -80,8 +80,8 @@ public struct ListType: IntrospectableViewType { } extension IntrospectableViewType where Self == ListType { - @MainActor public static var list: Self { .init() } - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static var list: Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 7d40fa12..0fc45c43 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -78,7 +78,7 @@ public struct ListCellType: IntrospectableViewType { } extension IntrospectableViewType where Self == ListCellType { - @MainActor public static var listCell: Self { .init() } + public static var listCell: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index ab8a7306..2aa80ed0 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -40,7 +40,7 @@ public struct ListWithBorderedStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ListWithBorderedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index fb041297..27a11975 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -71,7 +71,7 @@ public struct ListWithGroupedStyleType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == ListWithGroupedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index 5bc535fb..d31872ab 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -57,7 +57,7 @@ public struct ListWithInsetGroupedStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index 88058fec..9e14d88d 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -71,7 +71,7 @@ public struct ListWithInsetStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == ListWithInsetStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index 1557d95a..c6baff58 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -71,7 +71,7 @@ public struct ListWithSidebarStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == ListWithSidebarStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 97d0f849..0268895b 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -68,7 +68,7 @@ public struct MapType: IntrospectableViewType {} import MapKit extension IntrospectableViewType where Self == MapType { - @MainActor public static var map: Self { .init() } + public static var map: Self { .init() } } extension iOSViewVersion { diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 7a125144..195bb9ea 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -73,7 +73,7 @@ import SwiftUI public struct NavigationSplitViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationSplitViewType { - @MainActor public static var navigationSplitView: Self { .init() } + public static var navigationSplitView: Self { .init() } } #if canImport(UIKit) @@ -89,7 +89,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } @@ -106,7 +106,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -115,7 +115,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index 07e9fe09..26ee12bf 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -54,7 +54,7 @@ import SwiftUI public struct NavigationStackType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationStackType { - @MainActor public static var navigationStack: Self { .init() } + public static var navigationStack: Self { .init() } } #if canImport(UIKit) @@ -70,7 +70,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -87,7 +87,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -96,7 +96,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index a4eef396..94e8e72b 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -73,7 +73,7 @@ public struct NavigationViewWithColumnsStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleType { - @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } + public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) @@ -85,7 +85,7 @@ extension iOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } @@ -98,7 +98,7 @@ extension tvOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -107,7 +107,7 @@ extension visionOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index ff47def3..f44064b3 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -61,7 +61,7 @@ public struct NavigationViewWithStackStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == NavigationViewWithStackStyleType { - @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } + public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) @@ -73,7 +73,7 @@ extension iOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -86,7 +86,7 @@ extension tvOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -95,7 +95,7 @@ extension visionOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index 1ae4b77c..a16304e5 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -60,7 +60,7 @@ import SwiftUI public struct PageControlType: IntrospectableViewType {} extension IntrospectableViewType where Self == PageControlType { - @MainActor public static var pageControl: Self { .init() } + public static var pageControl: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 0e946212..2a7079e2 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -42,7 +42,7 @@ public struct PickerWithMenuStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == PickerWithMenuStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index 4eddbb9c..7ad1ff04 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -89,7 +89,7 @@ public struct PickerWithSegmentedStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == PickerWithSegmentedStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index a5527356..991fff35 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -58,7 +58,7 @@ public struct PickerWithWheelStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PickerWithWheelStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 45f3e771..2f28ab4c 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -52,7 +52,7 @@ public struct PopoverType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PopoverType { - @MainActor public static var popover: Self { .init() } + public static var popover: Self { .init() } } #if canImport(UIKit) @@ -64,7 +64,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) } } @@ -73,7 +73,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) } } diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index 57cceb3b..d6a79677 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -65,7 +65,7 @@ public struct ProgressViewWithCircularStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == ProgressViewWithCircularStyleType { - @MainActor public static func progressView(style: Self.Style) -> Self { .init() } + public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 4d529a01..9c436166 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -65,7 +65,7 @@ public struct ProgressViewWithLinearStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == ProgressViewWithLinearStyleType { - @MainActor public static func progressView(style: Self.Style) -> Self { .init() } + public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index 89f69be5..c449c7f4 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -65,7 +65,7 @@ import SwiftUI public struct ScrollViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == ScrollViewType { - @MainActor public static var scrollView: Self { .init() } + public static var scrollView: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index 05b7f666..ce7129ce 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -66,7 +66,7 @@ import SwiftUI public struct SearchFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SearchFieldType { - @MainActor public static var searchField: Self { .init() } + public static var searchField: Self { .init() } } #if canImport(UIKit) @@ -80,7 +80,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -97,7 +97,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -108,7 +108,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index 8fa8a565..f8d330c4 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -65,7 +65,7 @@ import SwiftUI public struct SecureFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SecureFieldType { - @MainActor public static var secureField: Self { .init() } + public static var secureField: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index b99aa576..cb7619bc 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -66,7 +66,7 @@ public struct SheetType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == SheetType { - @MainActor public static var sheet: Self { .init() } + public static var sheet: Self { .init() } } #if canImport(UIKit) @@ -78,7 +78,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -95,7 +95,7 @@ extension iOSViewVersion { @_disfavoredOverload public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) } } @@ -105,7 +105,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) } } @@ -119,7 +119,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index 7cc09183..34e283b8 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -44,7 +44,7 @@ public struct SliderType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == SliderType { - @MainActor public static var slider: Self { .init() } + public static var slider: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index 3379d6bc..40e6dd1b 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -44,7 +44,7 @@ public struct StepperType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == StepperType { - @MainActor public static var stepper: Self { .init() } + public static var stepper: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index cf8b9bfa..a4657d4b 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -58,7 +58,7 @@ public struct TabViewType: IntrospectableViewType {} #if !os(visionOS) extension IntrospectableViewType where Self == TabViewType { - @MainActor public static var tabView: Self { .init() } + public static var tabView: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 1dfc5d1e..eaada897 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -65,7 +65,7 @@ public struct TabViewWithPageStyleType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == TabViewWithPageStyleType { - @MainActor public static func tabView(style: Self.Style) -> Self { .init() } + public static func tabView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index 756ef7bf..4baee5ff 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -106,7 +106,7 @@ public struct TableType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TableType { - @MainActor public static var table: Self { .init() } + public static var table: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index 760fe11d..d97ffcc8 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -55,7 +55,7 @@ public struct TextEditorType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TextEditorType { - @MainActor public static var textEditor: Self { .init() } + public static var textEditor: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 76f90caf..7abc2ac6 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -65,7 +65,7 @@ import SwiftUI public struct TextFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == TextFieldType { - @MainActor public static var textField: Self { .init() } + public static var textField: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index 2d9478dd..d76a453c 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -69,7 +69,7 @@ public struct TextFieldWithVerticalAxisType: IntrospectableViewType { } extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { - @MainActor public static func textField(axis: Self.Axis) -> Self { .init() } + public static func textField(axis: Self.Axis) -> Self { .init() } } // MARK: SwiftUI.TextField(..., axis: .vertical) - iOS diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index 0914722c..c8924a2d 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -44,7 +44,7 @@ public struct ToggleType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleType { - @MainActor public static var toggle: Self { .init() } + public static var toggle: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 83d34018..d5f9fe43 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -38,7 +38,7 @@ public struct ToggleWithButtonStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithButtonStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index ea1d5f48..ee7844ab 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -38,7 +38,7 @@ public struct ToggleWithCheckboxStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithCheckboxStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index c76221b3..2788a36e 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -50,7 +50,7 @@ public struct ToggleWithSwitchStyleType: IntrospectableViewType { #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithSwitchStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index e43ae6de..be50449c 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -60,7 +60,7 @@ public struct VideoPlayerType: IntrospectableViewType {} import AVKit extension IntrospectableViewType where Self == VideoPlayerType { - @MainActor public static var videoPlayer: Self { .init() } + public static var videoPlayer: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index 76ce2db3..86c3941d 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -69,7 +69,7 @@ public struct ViewControllerType: IntrospectableViewType { } extension IntrospectableViewType where Self == ViewControllerType { - @MainActor public static var viewController: Self { .init() } + public static var viewController: Self { .init() } } #if canImport(UIKit) From cfc3c30cfe15789dc31931f1467d0eb477244360 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:16:36 +0100 Subject: [PATCH 12/21] WIP --- Sources/Introspect.swift | 12 ------------ Sources/IntrospectionSelector.swift | 3 --- Sources/IntrospectionView.swift | 3 +-- Sources/ViewTypes/ListCell.swift | 2 +- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Sources/Introspect.swift b/Sources/Introspect.swift index 1572c0f6..67d6ea12 100644 --- a/Sources/Introspect.swift +++ b/Sources/Introspect.swift @@ -103,46 +103,37 @@ public protocol PlatformEntity: AnyObject { associatedtype Base: PlatformEntity @_spi(Internals) - @MainActor var ancestor: Base? { get } @_spi(Internals) - @MainActor var descendants: [Base] { get } @_spi(Internals) - @MainActor func isDescendant(of other: Base) -> Bool } extension PlatformEntity { @_spi(Internals) - @MainActor public var ancestor: Base? { nil } @_spi(Internals) - @MainActor public var descendants: [Base] { [] } @_spi(Internals) - @MainActor public func isDescendant(of other: Base) -> Bool { false } } extension PlatformEntity { @_spi(Internals) - @MainActor public var ancestors: some Sequence { sequence(first: self~, next: { $0.ancestor~ }).dropFirst() } @_spi(Internals) - @MainActor public var allDescendants: some Sequence { recursiveSequence([self~], children: { $0.descendants~ }).dropFirst() } - @MainActor func nearestCommonAncestor(with other: Base) -> Base? { var nearestAncestor: Base? = self~ @@ -153,7 +144,6 @@ extension PlatformEntity { return nearestAncestor } - @MainActor func allDescendants(between bottomEntity: Base, and topEntity: Base) -> some Sequence { self.allDescendants .lazy @@ -161,7 +151,6 @@ extension PlatformEntity { .prefix(while: { $0 !== topEntity }) } - @MainActor func receiver( ofType type: PlatformSpecificEntity.Type ) -> PlatformSpecificEntity? { @@ -180,7 +169,6 @@ extension PlatformEntity { .first } - @MainActor func ancestor( ofType type: PlatformSpecificEntity.Type ) -> PlatformSpecificEntity? { diff --git a/Sources/IntrospectionSelector.swift b/Sources/IntrospectionSelector.swift index 8722d3c4..f4d38b35 100644 --- a/Sources/IntrospectionSelector.swift +++ b/Sources/IntrospectionSelector.swift @@ -4,11 +4,9 @@ @MainActor public struct IntrospectionSelector { @_spi(Advanced) - @MainActor public static var `default`: Self { .from(Target.self, selector: { $0 }) } @_spi(Advanced) - @MainActor public static func from(_ entryType: Entry.Type, selector: @MainActor @escaping (Entry) -> Target?) -> Self { .init( receiverSelector: { controller in @@ -45,7 +43,6 @@ public struct IntrospectionSelector { return copy } - @MainActor func callAsFunction(_ controller: IntrospectionPlatformViewController, _ scope: IntrospectionScope) -> Target? { if scope.contains(.receiver), diff --git a/Sources/IntrospectionView.swift b/Sources/IntrospectionView.swift index 2386f1e6..c464b5b3 100644 --- a/Sources/IntrospectionView.swift +++ b/Sources/IntrospectionView.swift @@ -3,8 +3,8 @@ import SwiftUI typealias IntrospectionViewID = UUID +@MainActor fileprivate enum IntrospectionStore { - @MainActor static var shared: [IntrospectionViewID: Pair] = [:] struct Pair { @@ -14,7 +14,6 @@ fileprivate enum IntrospectionStore { } extension PlatformEntity { - @MainActor var introspectionAnchorEntity: Base? { if let introspectionController = self as? IntrospectionPlatformViewController { return IntrospectionStore.shared[introspectionController.id]?.anchor~ diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 0fc45c43..3684e6b6 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -74,7 +74,7 @@ import SwiftUI /// } /// ``` public struct ListCellType: IntrospectableViewType { - @MainActor public var scope: IntrospectionScope { .ancestor } + public var scope: IntrospectionScope { .ancestor } } extension IntrospectableViewType where Self == ListCellType { From ae29aa135e0165ae5e11e6e48a5072b563128f91 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:19:05 +0100 Subject: [PATCH 13/21] WIP --- Sources/ViewTypes/Window.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index 715643d5..b0d4291f 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -69,7 +69,6 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: { $0.window }) } @@ -83,7 +82,6 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: { $0.window }) } @@ -93,7 +91,6 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { .from(UIView.self, selector: { $0.window }) } @@ -107,7 +104,6 @@ extension macOSViewVersion { public static let v14 = Self(for: .v14, selector: selector) public static let v15 = Self(for: .v15, selector: selector) - @MainActor private static var selector: IntrospectionSelector { .from(NSView.self, selector: { $0.window }) } From 72bfa56d5df770835e2d9c90e07f2605cd38b10e Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:20:35 +0100 Subject: [PATCH 14/21] WIP --- Sources/IntrospectionSelector.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/IntrospectionSelector.swift b/Sources/IntrospectionSelector.swift index f4d38b35..af1b1235 100644 --- a/Sources/IntrospectionSelector.swift +++ b/Sources/IntrospectionSelector.swift @@ -30,14 +30,14 @@ public struct IntrospectionSelector { } @_spi(Advanced) - public func withReceiverSelector(_ selector: @MainActor @Sendable @escaping (PlatformViewController) -> Target?) -> Self { + public func withReceiverSelector(_ selector: @MainActor @escaping (PlatformViewController) -> Target?) -> Self { var copy = self copy.receiverSelector = selector return copy } @_spi(Advanced) - public func withAncestorSelector(_ selector: @MainActor @Sendable @escaping (PlatformViewController) -> Target?) -> Self { + public func withAncestorSelector(_ selector: @MainActor @escaping (PlatformViewController) -> Target?) -> Self { var copy = self copy.ancestorSelector = selector return copy From ac1b7b637d9679076de2ef348f122224abbbc4b6 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:38:46 +0100 Subject: [PATCH 15/21] WIP --- Sources/PlatformView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/PlatformView.swift b/Sources/PlatformView.swift index 045b47d6..11bc6f30 100644 --- a/Sources/PlatformView.swift +++ b/Sources/PlatformView.swift @@ -19,6 +19,7 @@ typealias _PlatformViewControllerRepresentable = UIViewControllerRepresentable typealias _PlatformViewControllerRepresentable = NSViewControllerRepresentable #endif +@MainActor protocol PlatformViewControllerRepresentable: _PlatformViewControllerRepresentable { #if canImport(UIKit) typealias ViewController = UIViewControllerType From 7fbdc0eae46cc480df41198429fab26236803287 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:20:30 +0100 Subject: [PATCH 16/21] WIP --- Examples/Showcase/Showcase/AppView.swift | 58 +++++++++---------- Sources/Introspect.swift | 2 +- Sources/ViewTypes/SignInWithAppleButton.swift | 4 +- Tests/Tests/ViewTypes/ColorPickerTests.swift | 6 +- Tests/Tests/ViewTypes/DatePickerTests.swift | 6 +- ...DatePickerWithCompactFieldStyleTests.swift | 6 +- .../DatePickerWithGraphicalStyleTests.swift | 6 +- .../DatePickerWithWheelStyleTests.swift | 6 +- Tests/Tests/ViewTypes/FormTests.swift | 8 +-- .../ViewTypes/FormWithGroupedStyleTests.swift | 8 +-- .../ViewTypes/FullScreenCoverTests.swift | 2 +- Tests/Tests/ViewTypes/ListCellTests.swift | 8 +-- Tests/Tests/ViewTypes/ListTests.swift | 24 ++++---- .../ViewTypes/ListWithGroupedStyleTests.swift | 8 +-- .../ListWithInsetGroupedStyleTests.swift | 4 +- .../ViewTypes/ListWithInsetStyleTests.swift | 4 +- .../ViewTypes/ListWithPlainStyleTests.swift | 8 +-- .../ViewTypes/ListWithSidebarStyleTests.swift | 4 +- Tests/Tests/ViewTypes/MapTests.swift | 6 +- .../ViewTypes/NavigationSplitViewTests.swift | 8 +-- .../ViewTypes/NavigationStackTests.swift | 4 +- .../NavigationViewWithColumnsStyleTests.swift | 10 ++-- .../NavigationViewWithStackStyleTests.swift | 4 +- Tests/Tests/ViewTypes/PageControlTests.swift | 2 +- .../PickerWithSegmentedStyleTests.swift | 6 +- .../ViewTypes/PickerWithWheelStyleTests.swift | 6 +- Tests/Tests/ViewTypes/PopoverTests.swift | 2 +- .../ProgressViewWithCircularStyleTests.swift | 6 +- .../ProgressViewWithLinearStyleTests.swift | 6 +- Tests/Tests/ViewTypes/ScrollViewTests.swift | 12 ++-- Tests/Tests/ViewTypes/SearchFieldTests.swift | 12 ++-- Tests/Tests/ViewTypes/SecureFieldTests.swift | 12 ++-- Tests/Tests/ViewTypes/SheetTests.swift | 6 +- Tests/Tests/ViewTypes/SliderTests.swift | 6 +- Tests/Tests/ViewTypes/StepperTests.swift | 6 +- Tests/Tests/ViewTypes/TabViewTests.swift | 4 +- .../ViewTypes/TabViewWithPageStyleTests.swift | 4 +- Tests/Tests/ViewTypes/TableTests.swift | 12 ++-- Tests/Tests/ViewTypes/TextEditorTests.swift | 6 +- Tests/Tests/ViewTypes/TextFieldTests.swift | 12 ++-- .../TextFieldWithVerticalAxisTests.swift | 12 ++-- Tests/Tests/ViewTypes/ToggleTests.swift | 6 +- .../ToggleWithSwitchStyleTests.swift | 6 +- Tests/Tests/ViewTypes/VideoPlayerTests.swift | 6 +- .../Tests/ViewTypes/ViewControllerTests.swift | 6 +- Tests/Tests/ViewTypes/ViewTests.swift | 6 +- Tests/Tests/ViewTypes/WindowTests.swift | 6 +- 47 files changed, 186 insertions(+), 186 deletions(-) diff --git a/Examples/Showcase/Showcase/AppView.swift b/Examples/Showcase/Showcase/AppView.swift index 44083e38..7ac408f6 100644 --- a/Examples/Showcase/Showcase/AppView.swift +++ b/Examples/Showcase/Showcase/AppView.swift @@ -7,7 +7,7 @@ struct AppView: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .window, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { window in window.backgroundColor = .brown } @@ -46,7 +46,7 @@ struct ContentView: View { .tag(5) } #if os(iOS) || os(tvOS) - .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tabBarController in + .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { tabBarController in tabBarController.tabBar.layer.backgroundColor = UIColor.green.cgColor } #elseif os(macOS) @@ -83,11 +83,11 @@ struct ListShowcase: View { Text("Item 2") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tableView in + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { tableView in tableView.backgroundView = UIView() tableView.backgroundColor = .cyan } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { collectionView in + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { collectionView in collectionView.backgroundView = UIView() collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan } @@ -108,11 +108,11 @@ struct ListShowcase: View { Text("Item 1") Text("Item 2") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { tableView in + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { tableView in tableView.backgroundView = UIView() tableView.backgroundColor = .cyan } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { collectionView in + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { collectionView in collectionView.backgroundView = UIView() collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan } @@ -150,7 +150,7 @@ struct ScrollViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .scrollView, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { scrollView in scrollView.layer.backgroundColor = UIColor.cyan.cgColor } @@ -171,7 +171,7 @@ struct ScrollViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .scrollView, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor ) { scrollView in scrollView.layer.backgroundColor = UIColor.cyan.cgColor @@ -207,13 +207,13 @@ struct NavigationShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .navigationView(style: .stack), - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { navigationController in navigationController.navigationBar.backgroundColor = .cyan } .introspect( .navigationView(style: .columns), - on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { splitViewController in #if os(visionOS) splitViewController.preferredDisplayMode = .oneBesideSecondary @@ -221,12 +221,12 @@ struct NavigationShowcase: View { splitViewController.preferredDisplayMode = .oneOverSecondary #endif } - .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in + .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { navigationController in navigationController.navigationBar.backgroundColor = .cyan } .introspect( .searchField, - on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1) ) { searchBar in searchBar.backgroundColor = .red #if os(iOS) @@ -251,7 +251,7 @@ struct PresentationShowcase: View { #if os(iOS) || os(tvOS) .introspect( .sheet, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18) ) { presentationController in presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75) } @@ -269,7 +269,7 @@ struct PresentationShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .fullScreenCover, - on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { presentationController in presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75) } @@ -284,7 +284,7 @@ struct PresentationShowcase: View { .padding() .introspect( .popover, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { presentationController in presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75) } @@ -305,7 +305,7 @@ struct GenericViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .view, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { view in view.backgroundColor = .cyan } @@ -320,7 +320,7 @@ struct GenericViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .view, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { view in view.backgroundColor = .lightGray } @@ -334,7 +334,7 @@ struct GenericViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .view, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { view in view.backgroundColor = .blue } @@ -348,7 +348,7 @@ struct GenericViewShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .view, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { view in view.backgroundColor = .red } @@ -375,7 +375,7 @@ struct SimpleElementsShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .textField, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { textField in textField.backgroundColor = .red } @@ -390,7 +390,7 @@ struct SimpleElementsShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .textField, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { textField in textField.backgroundColor = .green } @@ -408,7 +408,7 @@ struct SimpleElementsShowcase: View { #if os(iOS) .introspect( .toggle, - on: .iOS(.v13, .v14, .v15, .v16, .v17) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18) ) { toggle in toggle.backgroundColor = .red } @@ -422,7 +422,7 @@ struct SimpleElementsShowcase: View { #if os(iOS) .introspect( .toggle, - on: .iOS(.v13, .v14, .v15, .v16, .v17) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18) ) { toggle in toggle.backgroundColor = .green } @@ -436,7 +436,7 @@ struct SimpleElementsShowcase: View { HStack { Slider(value: $sliderValue, in: 0...100) #if os(iOS) - .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in + .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { slider in slider.backgroundColor = .red } #elseif os(macOS) @@ -447,7 +447,7 @@ struct SimpleElementsShowcase: View { Slider(value: $sliderValue, in: 0...100) #if os(iOS) - .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in + .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { slider in slider.backgroundColor = .green } #elseif os(macOS) @@ -462,7 +462,7 @@ struct SimpleElementsShowcase: View { Text("Stepper Red") } #if os(iOS) - .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in + .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { stepper in stepper.backgroundColor = .red } #elseif os(macOS) @@ -475,7 +475,7 @@ struct SimpleElementsShowcase: View { Text("Stepper Green") } #if os(iOS) - .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in + .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { stepper in stepper.backgroundColor = .green } #elseif os(macOS) @@ -491,7 +491,7 @@ struct SimpleElementsShowcase: View { Text("DatePicker Red") } #if os(iOS) || os(visionOS) - .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)) { datePicker in + .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)) { datePicker in datePicker.backgroundColor = .red } #elseif os(macOS) @@ -512,7 +512,7 @@ struct SimpleElementsShowcase: View { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .picker(style: .segmented), - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1) + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1) ) { datePicker in datePicker.backgroundColor = .red } diff --git a/Sources/Introspect.swift b/Sources/Introspect.swift index 67d6ea12..39a4ea20 100644 --- a/Sources/Introspect.swift +++ b/Sources/Introspect.swift @@ -34,7 +34,7 @@ extension View { /// /// var body: some View { /// TextField("Placeholder", text: $text) - /// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { + /// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITextField /// } /// } diff --git a/Sources/ViewTypes/SignInWithAppleButton.swift b/Sources/ViewTypes/SignInWithAppleButton.swift index 76eb35ce..f28d3249 100644 --- a/Sources/ViewTypes/SignInWithAppleButton.swift +++ b/Sources/ViewTypes/SignInWithAppleButton.swift @@ -13,7 +13,7 @@ import SwiftUI /// } onCompletion: { result in /// // do something with result /// } -/// .introspect(.signInWithAppleButton, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.signInWithAppleButton, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // ASAuthorizationAppleIDButton /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// } onCompletion: { result in /// // do something with result /// } -/// .introspect(.signInWithAppleButton, on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.signInWithAppleButton, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // ASAuthorizationAppleIDButton /// } /// } diff --git a/Tests/Tests/ViewTypes/ColorPickerTests.swift b/Tests/Tests/ViewTypes/ColorPickerTests.swift index f61bd4b9..d80b48ac 100644 --- a/Tests/Tests/ViewTypes/ColorPickerTests.swift +++ b/Tests/Tests/ViewTypes/ColorPickerTests.swift @@ -27,21 +27,21 @@ final class ColorPickerTests: XCTestCase { VStack { ColorPicker("", selection: .constant(PlatformColor.red.cgColor)) #if os(iOS) || os(visionOS) - .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif ColorPicker("", selection: .constant(PlatformColor.green.cgColor)) #if os(iOS) || os(visionOS) - .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif ColorPicker("", selection: .constant(PlatformColor.blue.cgColor)) #if os(iOS) || os(visionOS) - .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerTests.swift b/Tests/Tests/ViewTypes/DatePickerTests.swift index 1cdaf623..6b7a3147 100644 --- a/Tests/Tests/ViewTypes/DatePickerTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerTests.swift @@ -24,7 +24,7 @@ final class DatePickerTests: XCTestCase { VStack { DatePicker("", selection: .constant(date0)) #if os(iOS) || os(visionOS) - .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -32,7 +32,7 @@ final class DatePickerTests: XCTestCase { DatePicker("", selection: .constant(date1)) #if os(iOS) || os(visionOS) - .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -40,7 +40,7 @@ final class DatePickerTests: XCTestCase { DatePicker("", selection: .constant(date2)) #if os(iOS) || os(visionOS) - .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift index 3698f84b..bf2dd657 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift @@ -30,7 +30,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.compact) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -39,7 +39,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date1)) .datePickerStyle(.compact) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -48,7 +48,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date2)) .datePickerStyle(.compact) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift index 8aa62db4..74cc2dc4 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift @@ -30,7 +30,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.graphical) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -39,7 +39,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date1)) .datePickerStyle(.graphical) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -48,7 +48,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date2)) .datePickerStyle(.graphical) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift index ac1256f2..d0a86f5c 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift @@ -23,21 +23,21 @@ final class DatePickerWithWheelStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #endif .cornerRadius(8) DatePicker("", selection: .constant(date1)) .datePickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #endif .cornerRadius(8) DatePicker("", selection: .constant(date2)) .datePickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #endif } } extraAssertions: { diff --git a/Tests/Tests/ViewTypes/FormTests.swift b/Tests/Tests/ViewTypes/FormTests.swift index c6125c8b..f4580949 100644 --- a/Tests/Tests/ViewTypes/FormTests.swift +++ b/Tests/Tests/ViewTypes/FormTests.swift @@ -21,15 +21,15 @@ final class FormTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.form, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.form, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #endif Form { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) } - .introspect(.form, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { spy1($0) } + .introspect(.form, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #endif } } diff --git a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift index d6fdef3b..53c1ec36 100644 --- a/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/FormWithGroupedStyleTests.swift @@ -26,8 +26,8 @@ final class FormWithGroupedStyleTests: XCTestCase { } .formStyle(.grouped) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.form(style: .grouped), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } - .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17)) { spy0($0) } + .introspect(.form(style: .grouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } + .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17, .v18)) { spy0($0) } #elseif os(macOS) .introspect(.form(style: .grouped), on: .macOS(.v13, .v14)) { spy0($0) } #endif @@ -35,8 +35,8 @@ final class FormWithGroupedStyleTests: XCTestCase { Form { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.form(style: .grouped), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } - .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17), scope: .ancestor) { spy1($0) } + .introspect(.form(style: .grouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17, .v18), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.form(style: .grouped), on: .macOS(.v13, .v14), scope: .ancestor) { spy1($0) } #endif diff --git a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift index 66944199..92aabcea 100644 --- a/Tests/Tests/ViewTypes/FullScreenCoverTests.swift +++ b/Tests/Tests/ViewTypes/FullScreenCoverTests.swift @@ -20,7 +20,7 @@ final class FullScreenCoverTests: XCTestCase { #if os(iOS) || os(tvOS) || os(visionOS) .introspect( .fullScreenCover, - on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0 ) #endif diff --git a/Tests/Tests/ViewTypes/ListCellTests.swift b/Tests/Tests/ViewTypes/ListCellTests.swift index 2d4b65a9..d6167827 100644 --- a/Tests/Tests/ViewTypes/ListCellTests.swift +++ b/Tests/Tests/ViewTypes/ListCellTests.swift @@ -17,8 +17,8 @@ final class ListCellTests: XCTestCase { List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy($0) } - .introspect(.listCell, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy($0) } + .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy($0) } + .introspect(.listCell, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy($0) } #elseif os(macOS) .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } #endif @@ -33,8 +33,8 @@ final class ListCellTests: XCTestCase { List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy($0) } - .introspect(.listCell, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy($0) } + .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy($0) } + .introspect(.listCell, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy($0) } #elseif os(macOS) .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } #endif diff --git a/Tests/Tests/ViewTypes/ListTests.swift b/Tests/Tests/ViewTypes/ListTests.swift index fe722b93..2867fc57 100644 --- a/Tests/Tests/ViewTypes/ListTests.swift +++ b/Tests/Tests/ViewTypes/ListTests.swift @@ -20,8 +20,8 @@ final class ListTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } #endif @@ -29,8 +29,8 @@ final class ListTests: XCTestCase { List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { spy1($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } #endif @@ -54,13 +54,13 @@ final class ListTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy1($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy1($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy1($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy1($0) } #endif } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #endif } extraAssertions: { XCTAssert($0[safe: 0] !== $0[safe: 1]) @@ -78,8 +78,8 @@ final class ListTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } #endif @@ -90,8 +90,8 @@ final class ListTests: XCTestCase { List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) } - .introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { spy1($0) } + .introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } #endif diff --git a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift index 5949ee45..0298705b 100644 --- a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift @@ -20,15 +20,15 @@ final class ListWithGroupedStyleTests: XCTestCase { } .listStyle(.grouped) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.list(style: .grouped), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.list(style: .grouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #endif List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) } - .introspect(.list(style: .grouped), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .grouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #endif } .listStyle(.grouped) diff --git a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift index 12f6cd8f..e20d6c58 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetGroupedStyleTests.swift @@ -26,14 +26,14 @@ final class ListWithInsetGroupedStyleTests: XCTestCase { .listStyle(.insetGrouped) #if os(iOS) || os(visionOS) .introspect(.list(style: .insetGrouped), on: .iOS(.v14, .v15)) { spy0($0) } - .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #endif List { Text("Item 1") #if os(iOS) || os(visionOS) .introspect(.list(style: .insetGrouped), on: .iOS(.v14, .v15), scope: .ancestor) { spy1($0) } - .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #endif } .listStyle(.insetGrouped) diff --git a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift index db88d126..e38193ca 100644 --- a/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithInsetStyleTests.swift @@ -28,7 +28,7 @@ final class ListWithInsetStyleTests: XCTestCase { .listStyle(.inset) #if os(iOS) || os(visionOS) .introspect(.list(style: .inset), on: .iOS(.v14, .v15)) { spy0($0) } - .introspect(.list(style: .inset), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list(style: .inset), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #elseif os(macOS) .introspect(.list(style: .inset), on: .macOS(.v11, .v12, .v13, .v14)) { spy0($0) } #endif @@ -37,7 +37,7 @@ final class ListWithInsetStyleTests: XCTestCase { Text("Item 1") #if os(iOS) || os(visionOS) .introspect(.list(style: .inset), on: .iOS(.v14, .v15), scope: .ancestor) { spy1($0) } - .introspect(.list(style: .inset), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .inset), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.list(style: .inset), on: .macOS(.v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } #endif diff --git a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift index 1ad621f3..b038f96d 100644 --- a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift @@ -21,8 +21,8 @@ final class ListWithPlainStyleTests: XCTestCase { } .listStyle(.plain) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) } - .introspect(.list(style: .plain), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { spy0($0) } + .introspect(.list(style: .plain), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #elseif os(macOS) .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } #endif @@ -30,8 +30,8 @@ final class ListWithPlainStyleTests: XCTestCase { List { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) } - .introspect(.list(style: .plain), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .plain), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } #endif diff --git a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift index 43de00ef..6b34d73d 100644 --- a/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithSidebarStyleTests.swift @@ -28,7 +28,7 @@ final class ListWithSidebarStyleTests: XCTestCase { .listStyle(.sidebar) #if os(iOS) || os(visionOS) .introspect(.list(style: .sidebar), on: .iOS(.v14, .v15)) { spy0($0) } - .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17), .visionOS(.v1)) { spy0($0) } + .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { spy0($0) } #elseif os(macOS) .introspect(.list(style: .sidebar), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } #endif @@ -37,7 +37,7 @@ final class ListWithSidebarStyleTests: XCTestCase { Text("Item 1") #if os(iOS) || os(visionOS) .introspect(.list(style: .sidebar), on: .iOS(.v14, .v15), scope: .ancestor) { spy1($0) } - .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { spy1($0) } + .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { spy1($0) } #elseif os(macOS) .introspect(.list(style: .sidebar), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } #endif diff --git a/Tests/Tests/ViewTypes/MapTests.swift b/Tests/Tests/ViewTypes/MapTests.swift index 27032671..451e87be 100644 --- a/Tests/Tests/ViewTypes/MapTests.swift +++ b/Tests/Tests/ViewTypes/MapTests.swift @@ -25,21 +25,21 @@ final class MapTests: XCTestCase { Map(coordinateRegion: region) .introspect( .map, - on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), + on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), customize: spy0 ) Map(coordinateRegion: region) .introspect( .map, - on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), + on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), customize: spy1 ) Map(coordinateRegion: region) .introspect( .map, - on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), + on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .macOS(.v11, .v12, .v13, .v14), .visionOS(.v1), customize: spy2 ) } diff --git a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift index 391ebe9d..441ee497 100644 --- a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift +++ b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift @@ -33,9 +33,9 @@ final class NavigationSplitViewTests: XCTestCase { } } #if os(iOS) || os(visionOS) - .introspect(.navigationSplitView, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.navigationSplitView, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy) #elseif os(tvOS) - .introspect(.navigationSplitView, on: .tvOS(.v16, .v17), customize: spy) + .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18), customize: spy) #elseif os(macOS) .introspect(.navigationSplitView, on: .macOS(.v13, .v14), customize: spy) #endif @@ -56,9 +56,9 @@ final class NavigationSplitViewTests: XCTestCase { Color.red Text("Sidebar") #if os(iOS) || os(visionOS) - .introspect(.navigationSplitView, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.navigationSplitView, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #elseif os(tvOS) - .introspect(.navigationSplitView, on: .tvOS(.v16, .v17), scope: .ancestor, customize: spy) + .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18), scope: .ancestor, customize: spy) #elseif os(macOS) .introspect(.navigationSplitView, on: .macOS(.v13, .v14), scope: .ancestor, customize: spy) #endif diff --git a/Tests/Tests/ViewTypes/NavigationStackTests.swift b/Tests/Tests/ViewTypes/NavigationStackTests.swift index 9ed4ac0c..e484a6b7 100644 --- a/Tests/Tests/ViewTypes/NavigationStackTests.swift +++ b/Tests/Tests/ViewTypes/NavigationStackTests.swift @@ -25,7 +25,7 @@ final class NavigationStackTests: XCTestCase { } } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.navigationStack, on: .iOS(.v16, .v17), .tvOS(.v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.navigationStack, on: .iOS(.v16, .v17, .v18), .tvOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif } } @@ -43,7 +43,7 @@ final class NavigationStackTests: XCTestCase { Color.red Text("Something") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.navigationStack, on: .iOS(.v16, .v17), .tvOS(.v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.navigationStack, on: .iOS(.v16, .v17, .v18), .tvOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #endif } } diff --git a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift index 4a1ae555..b22feeee 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift @@ -24,9 +24,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #if os(iOS) || os(visionOS) - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #elseif os(tvOS) - .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy) + .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy) #elseif os(macOS) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) #endif @@ -42,9 +42,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { Color.red Text("Something") #if os(iOS) || os(visionOS) - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #elseif os(tvOS) - .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy) + .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor, customize: spy) #elseif os(macOS) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) #endif @@ -53,7 +53,7 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { .navigationViewStyle(DoubleColumnNavigationViewStyle()) #if os(iOS) // NB: this is necessary for ancestor introspection to work, because initially on iPad the "Customized" text isn't shown as it's hidden in the sidebar. This is why ancestor introspection is discouraged for most situations and it's opt-in. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { $0.preferredDisplayMode = .oneOverSecondary } #endif diff --git a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift index 95ad9133..d9b975dc 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift @@ -21,7 +21,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { } .navigationViewStyle(.stack) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif } } @@ -35,7 +35,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { Color.red Text("Something") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #endif } } diff --git a/Tests/Tests/ViewTypes/PageControlTests.swift b/Tests/Tests/ViewTypes/PageControlTests.swift index 2b6aed8b..4e40fd52 100644 --- a/Tests/Tests/ViewTypes/PageControlTests.swift +++ b/Tests/Tests/ViewTypes/PageControlTests.swift @@ -24,7 +24,7 @@ final class PageControlTests: XCTestCase { } .tabViewStyle(.page(indexDisplayMode: .always)) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.pageControl, on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.pageControl, on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif } } diff --git a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift index 109c27d3..681e53c8 100644 --- a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift @@ -22,7 +22,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -34,7 +34,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -47,7 +47,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift index 10be27b9..0fc1caa7 100644 --- a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift @@ -21,7 +21,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #endif .cornerRadius(8) @@ -31,7 +31,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #endif .cornerRadius(8) @@ -42,7 +42,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #if os(iOS) || os(visionOS) - .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #endif } } extraAssertions: { diff --git a/Tests/Tests/ViewTypes/PopoverTests.swift b/Tests/Tests/ViewTypes/PopoverTests.swift index 9b31e073..6e9b68cd 100644 --- a/Tests/Tests/ViewTypes/PopoverTests.swift +++ b/Tests/Tests/ViewTypes/PopoverTests.swift @@ -14,7 +14,7 @@ final class PopoverTests: XCTestCase { Text("Popover") .introspect( .popover, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0 ) } diff --git a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift index b39448a4..af3802d1 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift @@ -24,7 +24,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.25) .progressViewStyle(.circular) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -32,7 +32,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.5) .progressViewStyle(.circular) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -40,7 +40,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.75) .progressViewStyle(.circular) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift index d6b889c2..f833f5c9 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift @@ -24,7 +24,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.25) .progressViewStyle(.linear) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -32,7 +32,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.5) .progressViewStyle(.linear) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -40,7 +40,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.75) .progressViewStyle(.linear) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ScrollViewTests.swift b/Tests/Tests/ViewTypes/ScrollViewTests.swift index caa9c6dc..6a973bd2 100644 --- a/Tests/Tests/ViewTypes/ScrollViewTests.swift +++ b/Tests/Tests/ViewTypes/ScrollViewTests.swift @@ -20,7 +20,7 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -28,7 +28,7 @@ final class ScrollViewTests: XCTestCase { ScrollView(showsIndicators: true) { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy1) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy1) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) #endif @@ -62,13 +62,13 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -98,7 +98,7 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -109,7 +109,7 @@ final class ScrollViewTests: XCTestCase { ScrollView(showsIndicators: true) { Text("Item 1") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy1) + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy1) #elseif os(macOS) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) #endif diff --git a/Tests/Tests/ViewTypes/SearchFieldTests.swift b/Tests/Tests/ViewTypes/SearchFieldTests.swift index ce197d77..890f75c2 100644 --- a/Tests/Tests/ViewTypes/SearchFieldTests.swift +++ b/Tests/Tests/ViewTypes/SearchFieldTests.swift @@ -24,7 +24,7 @@ final class SearchFieldTests: XCTestCase { } .navigationViewStyle(.stack) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.searchField, on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif } } @@ -41,7 +41,7 @@ final class SearchFieldTests: XCTestCase { Text("Customized") .searchable(text: .constant("")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.searchField, on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #endif } .navigationViewStyle(.stack) @@ -62,11 +62,11 @@ final class SearchFieldTests: XCTestCase { } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.searchField, on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif #if os(iOS) // NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { $0.preferredDisplayMode = .oneOverSecondary } #endif @@ -85,13 +85,13 @@ final class SearchFieldTests: XCTestCase { Text("Customized") .searchable(text: .constant("")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.searchField, on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #endif } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #if os(iOS) // NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { $0.preferredDisplayMode = .oneOverSecondary } #endif diff --git a/Tests/Tests/ViewTypes/SecureFieldTests.swift b/Tests/Tests/ViewTypes/SecureFieldTests.swift index bc2174d6..5a6acafc 100644 --- a/Tests/Tests/ViewTypes/SecureFieldTests.swift +++ b/Tests/Tests/ViewTypes/SecureFieldTests.swift @@ -19,7 +19,7 @@ final class SecureFieldTests: XCTestCase { VStack { SecureField("", text: .constant("Secure Field 0")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -27,7 +27,7 @@ final class SecureFieldTests: XCTestCase { SecureField("", text: .constant("Secure Field 1")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -35,7 +35,7 @@ final class SecureFieldTests: XCTestCase { SecureField("", text: .constant("Secure Field 2")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif @@ -62,21 +62,21 @@ final class SecureFieldTests: XCTestCase { List { SecureField("", text: .constant("Secure Field 0")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif SecureField("", text: .constant("Secure Field 1")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif SecureField("", text: .constant("Secure Field 2")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/SheetTests.swift b/Tests/Tests/ViewTypes/SheetTests.swift index 6607f96d..b958a27b 100644 --- a/Tests/Tests/ViewTypes/SheetTests.swift +++ b/Tests/Tests/ViewTypes/SheetTests.swift @@ -15,7 +15,7 @@ final class SheetTests: XCTestCase { Text("Sheet") .introspect( .sheet, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0 ) } @@ -35,7 +35,7 @@ final class SheetTests: XCTestCase { Text("Sheet") .introspect( .sheet, - on: .iOS(.v15, .v16, .v17), + on: .iOS(.v15, .v16, .v17, .v18), customize: spy0 ) } @@ -51,7 +51,7 @@ final class SheetTests: XCTestCase { Text("Content") .introspect( .sheet, - on: .tvOS(.v13, .v14, .v15, .v16, .v17), + on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0 ) } diff --git a/Tests/Tests/ViewTypes/SliderTests.swift b/Tests/Tests/ViewTypes/SliderTests.swift index cb2c6e9e..db608dc1 100644 --- a/Tests/Tests/ViewTypes/SliderTests.swift +++ b/Tests/Tests/ViewTypes/SliderTests.swift @@ -20,7 +20,7 @@ final class SliderTests: XCTestCase { VStack { Slider(value: .constant(0.2), in: 0...1) #if os(iOS) - .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0) + .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0) #elseif os(macOS) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -28,7 +28,7 @@ final class SliderTests: XCTestCase { Slider(value: .constant(0.5), in: 0...1) #if os(iOS) - .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1) + .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy1) #elseif os(macOS) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -36,7 +36,7 @@ final class SliderTests: XCTestCase { Slider(value: .constant(0.8), in: 0...1) #if os(iOS) - .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2) + .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy2) #elseif os(macOS) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/StepperTests.swift b/Tests/Tests/ViewTypes/StepperTests.swift index bf36df46..0e7546af 100644 --- a/Tests/Tests/ViewTypes/StepperTests.swift +++ b/Tests/Tests/ViewTypes/StepperTests.swift @@ -20,7 +20,7 @@ final class StepperTests: XCTestCase { VStack { Stepper("", value: .constant(0), in: 0...10) #if os(iOS) - .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0) + .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0) #elseif os(macOS) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -28,7 +28,7 @@ final class StepperTests: XCTestCase { Stepper("", value: .constant(0), in: 0...10) #if os(iOS) - .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1) + .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy1) #elseif os(macOS) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -36,7 +36,7 @@ final class StepperTests: XCTestCase { Stepper("", value: .constant(0), in: 0...10) #if os(iOS) - .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2) + .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy2) #elseif os(macOS) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TabViewTests.swift b/Tests/Tests/ViewTypes/TabViewTests.swift index 45b8db7f..b8ae2a9a 100644 --- a/Tests/Tests/ViewTypes/TabViewTests.swift +++ b/Tests/Tests/ViewTypes/TabViewTests.swift @@ -22,7 +22,7 @@ final class TabViewTests: XCTestCase { } } #if os(iOS) || os(tvOS) - .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy) + .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy) #elseif os(macOS) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) #endif @@ -38,7 +38,7 @@ final class TabViewTests: XCTestCase { Color.red Text("Something") #if os(iOS) || os(tvOS) - .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy) + .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor, customize: spy) #elseif os(macOS) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) #endif diff --git a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift index 3506ce46..58e80594 100644 --- a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift +++ b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift @@ -24,7 +24,7 @@ final class TabViewWithPageStyleTests: XCTestCase { } .tabViewStyle(.page) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy) + .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy) #endif } } @@ -40,7 +40,7 @@ final class TabViewWithPageStyleTests: XCTestCase { TabView { Text("Page 1").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), scope: .ancestor, customize: spy) + .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #endif Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) } diff --git a/Tests/Tests/ViewTypes/TableTests.swift b/Tests/Tests/ViewTypes/TableTests.swift index 2c13fe18..84fdebd3 100644 --- a/Tests/Tests/ViewTypes/TableTests.swift +++ b/Tests/Tests/ViewTypes/TableTests.swift @@ -25,21 +25,21 @@ final class TableTests: XCTestCase { VStack { TipTable() #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy0) #endif TipTable() #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy1) #endif TipTable() #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy2) #endif @@ -61,7 +61,7 @@ final class TableTests: XCTestCase { TipTable() .tableStyle(.inset) #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy0) #endif @@ -69,7 +69,7 @@ final class TableTests: XCTestCase { TipTable() .tableStyle(.inset) #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy1) #endif @@ -77,7 +77,7 @@ final class TableTests: XCTestCase { TipTable() .tableStyle(.inset) #if os(iOS) || os(visionOS) - .introspect(.table, on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.table, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.table, on: .macOS(.v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TextEditorTests.swift b/Tests/Tests/ViewTypes/TextEditorTests.swift index 17469009..157c6abc 100644 --- a/Tests/Tests/ViewTypes/TextEditorTests.swift +++ b/Tests/Tests/ViewTypes/TextEditorTests.swift @@ -25,7 +25,7 @@ final class TextEditorTests: XCTestCase { VStack { TextEditor(text: .constant("Text Field 0")) #if os(iOS) || os(visionOS) - .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -33,7 +33,7 @@ final class TextEditorTests: XCTestCase { TextEditor(text: .constant("Text Field 1")) #if os(iOS) || os(visionOS) - .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -41,7 +41,7 @@ final class TextEditorTests: XCTestCase { TextEditor(text: .constant("Text Field 2")) #if os(iOS) || os(visionOS) - .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TextFieldTests.swift b/Tests/Tests/ViewTypes/TextFieldTests.swift index fde6895e..148a2ed2 100644 --- a/Tests/Tests/ViewTypes/TextFieldTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldTests.swift @@ -19,7 +19,7 @@ final class TextFieldTests: XCTestCase { VStack { TextField("", text: .constant("Text Field 0")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -27,7 +27,7 @@ final class TextFieldTests: XCTestCase { TextField("", text: .constant("Text Field 1")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -35,7 +35,7 @@ final class TextFieldTests: XCTestCase { TextField("", text: .constant("Text Field 2")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif @@ -62,21 +62,21 @@ final class TextFieldTests: XCTestCase { List { TextField("", text: .constant("Text Field 0")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif TextField("", text: .constant("Text Field 1")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif TextField("", text: .constant("Text Field 2")) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift index b124e832..f5964743 100644 --- a/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldWithVerticalAxisTests.swift @@ -26,9 +26,9 @@ final class TextFieldWithVerticalAxisTests: XCTestCase { VStack { TextField("", text: .constant("Text Field 1"), axis: .vertical) #if os(iOS) || os(visionOS) - .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(tvOS) - .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17), customize: spy0) + .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17, .v18), customize: spy0) #elseif os(macOS) .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14), customize: spy0) #endif @@ -36,9 +36,9 @@ final class TextFieldWithVerticalAxisTests: XCTestCase { TextField("", text: .constant("Text Field 2"), axis: .vertical) #if os(iOS) || os(visionOS) - .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(tvOS) - .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17), customize: spy1) + .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17, .v18), customize: spy1) #elseif os(macOS) .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14), customize: spy1) #endif @@ -46,9 +46,9 @@ final class TextFieldWithVerticalAxisTests: XCTestCase { TextField("", text: .constant("Text Field 3"), axis: .vertical) #if os(iOS) || os(visionOS) - .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(tvOS) - .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17), customize: spy2) + .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17, .v18), customize: spy2) #elseif os(macOS) .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ToggleTests.swift b/Tests/Tests/ViewTypes/ToggleTests.swift index 765d6ebb..632d53d3 100644 --- a/Tests/Tests/ViewTypes/ToggleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleTests.swift @@ -20,21 +20,21 @@ final class ToggleTests: XCTestCase { VStack { Toggle("", isOn: .constant(true)) #if os(iOS) - .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0) + .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0) #elseif os(macOS) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif Toggle("", isOn: .constant(false)) #if os(iOS) - .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1) + .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy1) #elseif os(macOS) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif Toggle("", isOn: .constant(true)) #if os(iOS) - .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2) + .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy2) #elseif os(macOS) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift index 6a3b7758..5402ba40 100644 --- a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift @@ -21,7 +21,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(true)) .toggleStyle(.switch) #if os(iOS) - .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0) + .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy0) #elseif os(macOS) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -29,7 +29,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(false)) .toggleStyle(.switch) #if os(iOS) - .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1) + .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy1) #elseif os(macOS) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -37,7 +37,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(true)) .toggleStyle(.switch) #if os(iOS) - .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2) + .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), customize: spy2) #elseif os(macOS) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/VideoPlayerTests.swift b/Tests/Tests/ViewTypes/VideoPlayerTests.swift index c7019722..33f7722f 100644 --- a/Tests/Tests/ViewTypes/VideoPlayerTests.swift +++ b/Tests/Tests/ViewTypes/VideoPlayerTests.swift @@ -30,21 +30,21 @@ final class VideoPlayerTests: XCTestCase { VStack { VideoPlayer(player: AVPlayer(url: videoURL0)) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.videoPlayer, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif VideoPlayer(player: AVPlayer(url: videoURL1)) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.videoPlayer, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif VideoPlayer(player: AVPlayer(url: videoURL2)) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.videoPlayer, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ViewControllerTests.swift b/Tests/Tests/ViewTypes/ViewControllerTests.swift index 0f4d6d31..fb1e9960 100644 --- a/Tests/Tests/ViewTypes/ViewControllerTests.swift +++ b/Tests/Tests/ViewTypes/ViewControllerTests.swift @@ -16,7 +16,7 @@ final class ViewControllerTests: XCTestCase { Text("Root").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red) .introspect( .viewController, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2 ) } @@ -27,13 +27,13 @@ final class ViewControllerTests: XCTestCase { } .introspect( .viewController, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1 ) } .introspect( .viewController, - on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), + on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0 ) } extraAssertions: { diff --git a/Tests/Tests/ViewTypes/ViewTests.swift b/Tests/Tests/ViewTypes/ViewTests.swift index b7457940..354b146a 100644 --- a/Tests/Tests/ViewTypes/ViewTests.swift +++ b/Tests/Tests/ViewTypes/ViewTests.swift @@ -13,21 +13,21 @@ final class ViewTests: XCTestCase { VStack(spacing: 10) { Image(systemName: "scribble").resizable().frame(height: 30) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif Text("Text").frame(height: 40) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif } .padding(10) #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/WindowTests.swift b/Tests/Tests/ViewTypes/WindowTests.swift index cf474426..abf1efd6 100644 --- a/Tests/Tests/ViewTypes/WindowTests.swift +++ b/Tests/Tests/ViewTypes/WindowTests.swift @@ -19,20 +19,20 @@ final class WindowTests: XCTestCase { VStack { Image(systemName: "scribble") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0) + .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0) #elseif os(macOS) .introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif Text("Text") #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1) + .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1) #elseif os(macOS) .introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif } #if os(iOS) || os(tvOS) || os(visionOS) - .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2) + .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2) #elseif os(macOS) .introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif From 568084d527cbca0c99e3ba210c999ab9cec68c96 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:21:01 +0100 Subject: [PATCH 17/21] temp --- .github/workflows/ci.yml | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c43b4d1..64fdc2a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,88 +45,88 @@ jobs: fail-fast: false matrix: include: - - platform: [iOS, 13] - runtime: iOS 13.7 - os: macos-12 - xcode: 14.2 - install: true - - platform: [iOS, 14] - runtime: iOS 14.5 - os: macos-12 - xcode: 14.2 - install: true - - platform: [iOS, 15] - runtime: iOS 15.5 - os: macos-13 - xcode: 15.0.1 - install: true - - platform: [iOS, 16] - runtime: iOS 16.4 - os: macos-13 - xcode: 14.3.1 - - platform: [iOS, 17] - runtime: iOS 17.5 - os: macos-14 - xcode: 15.4 + # - platform: [iOS, 13] + # runtime: iOS 13.7 + # os: macos-12 + # xcode: 14.2 + # install: true + # - platform: [iOS, 14] + # runtime: iOS 14.5 + # os: macos-12 + # xcode: 14.2 + # install: true + # - platform: [iOS, 15] + # runtime: iOS 15.5 + # os: macos-13 + # xcode: 15.0.1 + # install: true + # - platform: [iOS, 16] + # runtime: iOS 16.4 + # os: macos-13 + # xcode: 14.3.1 + # - platform: [iOS, 17] + # runtime: iOS 17.5 + # os: macos-14 + # xcode: 15.4 - platform: [iOS, 18] runtime: iOS 18.0 os: macos-14 xcode: 16.0 - - platform: [tvOS, 13] - runtime: tvOS 13.4 - os: macos-12 - xcode: 14.2 - install: true - - platform: [tvOS, 14] - runtime: tvOS 14.5 - os: macos-12 - xcode: 14.2 - install: true - - platform: [tvOS, 15] - runtime: tvOS 15.4 - os: macos-13 - xcode: 15.0.1 - install: true - - platform: [tvOS, 16] - runtime: tvOS 16.4 - os: macos-13 - xcode: 15.0.1 - - platform: [tvOS, 17] - runtime: tvOS 17.5 - os: macos-14 - xcode: 15.4 + # - platform: [tvOS, 13] + # runtime: tvOS 13.4 + # os: macos-12 + # xcode: 14.2 + # install: true + # - platform: [tvOS, 14] + # runtime: tvOS 14.5 + # os: macos-12 + # xcode: 14.2 + # install: true + # - platform: [tvOS, 15] + # runtime: tvOS 15.4 + # os: macos-13 + # xcode: 15.0.1 + # install: true + # - platform: [tvOS, 16] + # runtime: tvOS 16.4 + # os: macos-13 + # xcode: 15.0.1 + # - platform: [tvOS, 17] + # runtime: tvOS 17.5 + # os: macos-14 + # xcode: 15.4 - platform: [tvOS, 18] runtime: tvOS 18.0 os: macos-14 xcode: 16.0 - - platform: [watchOS, 8] - runtime: watchOS 8.5 - os: macos-13 - xcode: 15.0.1 - install: true - - platform: [watchOS, 9] - runtime: watchOS 9.4 - os: macos-13 - xcode: 14.3.1 - - platform: [watchOS, 10] - runtime: watchOS 10.5 - os: macos-14 - xcode: 15.4 - - platform: [watchOS, 11] - runtime: watchOS 11.0 - os: macos-14 - xcode: 16.0 - - - platform: [macOS, 12] - runtime: macOS 12 - os: macos-12 - xcode: 14.2 - - platform: [macOS, 13] - runtime: macOS 13 - os: macos-13 - xcode: 15.0.1 + # - platform: [watchOS, 8] + # runtime: watchOS 8.5 + # os: macos-13 + # xcode: 15.0.1 + # install: true + # - platform: [watchOS, 9] + # runtime: watchOS 9.4 + # os: macos-13 + # xcode: 14.3.1 + # - platform: [watchOS, 10] + # runtime: watchOS 10.5 + # os: macos-14 + # xcode: 15.4 + # - platform: [watchOS, 11] + # runtime: watchOS 11.0 + # os: macos-14 + # xcode: 16.0 + + # - platform: [macOS, 12] + # runtime: macOS 12 + # os: macos-12 + # xcode: 14.2 + # - platform: [macOS, 13] + # runtime: macOS 13 + # os: macos-13 + # xcode: 15.0.1 # - platform: [macOS, 14] # runtime: macOS 14 # os: macos-14 From 360ce5f257450f37fcc40edb6c04a5617a1ff2b5 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:34:57 +0100 Subject: [PATCH 18/21] WIP --- Sources/ViewTypes/Map.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 0268895b..6704be0a 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -78,6 +78,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { From cc0f8616114cf0116ee23f4fb8bf4972ffdcdb46 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:49:33 +0100 Subject: [PATCH 19/21] WIP --- Tests/Tests/PlatformVersionTests.swift | 91 ++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/Tests/Tests/PlatformVersionTests.swift b/Tests/Tests/PlatformVersionTests.swift index 0b2e0169..2bd514ec 100644 --- a/Tests/Tests/PlatformVersionTests.swift +++ b/Tests/Tests/PlatformVersionTests.swift @@ -4,31 +4,43 @@ import XCTest final class PlatformVersionTests: XCTestCase { func test_iOS_isCurrent() { #if os(iOS) - if #available(iOS 17, *) { + if #available(iOS 18, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, true) + XCTAssertEqual(iOSVersion.v17.isCurrent, false) + XCTAssertEqual(iOSVersion.v16.isCurrent, false) + XCTAssertEqual(iOSVersion.v15.isCurrent, false) + XCTAssertEqual(iOSVersion.v14.isCurrent, false) + XCTAssertEqual(iOSVersion.v13.isCurrent, false) + } else if #available(iOS 17, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, true) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 16, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, true) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 15, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, true) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 14, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, true) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 13, *) { + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) @@ -36,6 +48,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(iOSVersion.v13.isCurrent, true) } #else + XCTAssertEqual(iOSVersion.v18.isCurrent, false) XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) @@ -46,31 +59,43 @@ final class PlatformVersionTests: XCTestCase { func test_iOS_isCurrentOrPast() { #if os(iOS) - if #available(iOS 17, *) { + if #available(iOS 18, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, true) + XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, true) + XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, true) + XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, true) + XCTAssertEqual(iOSVersion.v14.isCurrentOrPast, true) + XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) + } else if #available(iOS 17, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) } else if #available(iOS 16, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) } else if #available(iOS 15, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) } else if #available(iOS 14, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) } else if #available(iOS 13, *) { + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, false) @@ -78,6 +103,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(iOSVersion.v13.isCurrentOrPast, true) } #else + XCTAssertEqual(iOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(iOSVersion.v15.isCurrentOrPast, false) @@ -88,31 +114,43 @@ final class PlatformVersionTests: XCTestCase { func test_macOS_isCurrent() { #if os(macOS) - if #available(macOS 14, *) { + if #available(macOS 15, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, true) + XCTAssertEqual(macOSVersion.v14.isCurrent, false) + XCTAssertEqual(macOSVersion.v13.isCurrent, false) + XCTAssertEqual(macOSVersion.v12.isCurrent, false) + XCTAssertEqual(macOSVersion.v11.isCurrent, false) + XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) + } else if #available(macOS 14, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, true) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 13, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, true) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 12, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, true) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 11, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, true) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 10.15, *) { + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) @@ -120,6 +158,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(macOSVersion.v10_15.isCurrent, true) } #else + XCTAssertEqual(macOSVersion.v15.isCurrent, false) XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) @@ -130,31 +169,43 @@ final class PlatformVersionTests: XCTestCase { func test_macOS_isCurrentOrPast() { #if os(macOS) - if #available(macOS 14, *) { + if #available(macOS 15, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, true) + XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, true) + XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, true) + XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, true) + XCTAssertEqual(macOSVersion.v11.isCurrentOrPast, true) + XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) + } else if #available(macOS 14, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v11.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) } else if #available(macOS 13, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v11.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) } else if #available(macOS 12, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v11.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) } else if #available(macOS 11, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v11.isCurrentOrPast, true) XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) } else if #available(macOS 10.15, *) { + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, false) @@ -162,6 +213,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(macOSVersion.v10_15.isCurrentOrPast, true) } #else + XCTAssertEqual(macOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v14.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v13.isCurrentOrPast, false) XCTAssertEqual(macOSVersion.v12.isCurrentOrPast, false) @@ -172,31 +224,44 @@ final class PlatformVersionTests: XCTestCase { func test_tvOS_isCurrent() { #if os(tvOS) - if #available(tvOS 17, *) { + if #available(tvOS 18, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, true) + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) + XCTAssertEqual(tvOSVersion.v16.isCurrent, false) + XCTAssertEqual(tvOSVersion.v15.isCurrent, false) + XCTAssertEqual(tvOSVersion.v14.isCurrent, false) + XCTAssertEqual(tvOSVersion.v13.isCurrent, false) + } else if #available(tvOS 17, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, true) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 16, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, true) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 15, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, true) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 14, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, true) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 13, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) @@ -204,6 +269,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(tvOSVersion.v13.isCurrent, true) } #else + XCTAssertEqual(tvOSVersion.v18.isCurrent, false) XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) @@ -214,31 +280,43 @@ final class PlatformVersionTests: XCTestCase { func test_tvOS_isCurrentOrPast() { #if os(tvOS) - if #available(tvOS 17, *) { + if #available(tvOS 18, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, true) + XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, true) + XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, true) + XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, true) + XCTAssertEqual(tvOSVersion.v14.isCurrentOrPast, true) + XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) + } else if #available(tvOS 17, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) } else if #available(tvOS 16, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) } else if #available(tvOS 15, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) } else if #available(tvOS 14, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v14.isCurrentOrPast, true) XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) } else if #available(tvOS 13, *) { + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, false) @@ -246,6 +324,7 @@ final class PlatformVersionTests: XCTestCase { XCTAssertEqual(tvOSVersion.v13.isCurrentOrPast, true) } #else + XCTAssertEqual(tvOSVersion.v18.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v17.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v16.isCurrentOrPast, false) XCTAssertEqual(tvOSVersion.v15.isCurrentOrPast, false) From a6f8b48806f522dafab331ef77e8200bfe7f5bb2 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:37:09 +0100 Subject: [PATCH 20/21] WIP --- Sources/ViewTypes/NavigationSplitView.swift | 5 +++-- Tests/Tests/ViewTypes/NavigationSplitViewTests.swift | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 195bb9ea..44ee0c23 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -30,7 +30,7 @@ import SwiftUI /// } detail: { /// Text("Detail") /// } -/// .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18)) { +/// .introspect(.navigationSplitView, on: .tvOS(.v16, .v17)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -104,7 +104,8 @@ extension tvOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) - public static let v18 = Self(for: .v18, selector: selector) + @available(*, unavailable, message: "NavigationSplitView isn't backed by UIKit since tvOS 18") + public static let v18 = Self.unavailable() private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } diff --git a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift index 441ee497..5802f2a8 100644 --- a/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift +++ b/Tests/Tests/ViewTypes/NavigationSplitViewTests.swift @@ -17,6 +17,9 @@ final class NavigationSplitViewTests: XCTestCase { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() } + guard #unavailable(tvOS 18) else { + throw XCTSkip() + } XCTAssertViewIntrospection(of: PlatformNavigationSplitView.self) { spies in let spy = spies[0] @@ -35,7 +38,7 @@ final class NavigationSplitViewTests: XCTestCase { #if os(iOS) || os(visionOS) .introspect(.navigationSplitView, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), customize: spy) #elseif os(tvOS) - .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18), customize: spy) + .introspect(.navigationSplitView, on: .tvOS(.v16, .v17), customize: spy) #elseif os(macOS) .introspect(.navigationSplitView, on: .macOS(.v13, .v14), customize: spy) #endif @@ -46,6 +49,9 @@ final class NavigationSplitViewTests: XCTestCase { guard #available(iOS 16, tvOS 16, macOS 13, *) else { throw XCTSkip() } + guard #unavailable(tvOS 18) else { + throw XCTSkip() + } XCTAssertViewIntrospection(of: PlatformNavigationSplitView.self) { spies in let spy = spies[0] @@ -58,7 +64,7 @@ final class NavigationSplitViewTests: XCTestCase { #if os(iOS) || os(visionOS) .introspect(.navigationSplitView, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor, customize: spy) #elseif os(tvOS) - .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18), scope: .ancestor, customize: spy) + .introspect(.navigationSplitView, on: .tvOS(.v16, .v17), scope: .ancestor, customize: spy) #elseif os(macOS) .introspect(.navigationSplitView, on: .macOS(.v13, .v14), scope: .ancestor, customize: spy) #endif From 514d1268c2574fda58cbe320037acbe80183cfd5 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:37:52 +0100 Subject: [PATCH 21/21] Revert "temp" This reverts commit 568084d527cbca0c99e3ba210c999ab9cec68c96. --- .github/workflows/ci.yml | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64fdc2a2..1c43b4d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,88 +45,88 @@ jobs: fail-fast: false matrix: include: - # - platform: [iOS, 13] - # runtime: iOS 13.7 - # os: macos-12 - # xcode: 14.2 - # install: true - # - platform: [iOS, 14] - # runtime: iOS 14.5 - # os: macos-12 - # xcode: 14.2 - # install: true - # - platform: [iOS, 15] - # runtime: iOS 15.5 - # os: macos-13 - # xcode: 15.0.1 - # install: true - # - platform: [iOS, 16] - # runtime: iOS 16.4 - # os: macos-13 - # xcode: 14.3.1 - # - platform: [iOS, 17] - # runtime: iOS 17.5 - # os: macos-14 - # xcode: 15.4 + - platform: [iOS, 13] + runtime: iOS 13.7 + os: macos-12 + xcode: 14.2 + install: true + - platform: [iOS, 14] + runtime: iOS 14.5 + os: macos-12 + xcode: 14.2 + install: true + - platform: [iOS, 15] + runtime: iOS 15.5 + os: macos-13 + xcode: 15.0.1 + install: true + - platform: [iOS, 16] + runtime: iOS 16.4 + os: macos-13 + xcode: 14.3.1 + - platform: [iOS, 17] + runtime: iOS 17.5 + os: macos-14 + xcode: 15.4 - platform: [iOS, 18] runtime: iOS 18.0 os: macos-14 xcode: 16.0 - # - platform: [tvOS, 13] - # runtime: tvOS 13.4 - # os: macos-12 - # xcode: 14.2 - # install: true - # - platform: [tvOS, 14] - # runtime: tvOS 14.5 - # os: macos-12 - # xcode: 14.2 - # install: true - # - platform: [tvOS, 15] - # runtime: tvOS 15.4 - # os: macos-13 - # xcode: 15.0.1 - # install: true - # - platform: [tvOS, 16] - # runtime: tvOS 16.4 - # os: macos-13 - # xcode: 15.0.1 - # - platform: [tvOS, 17] - # runtime: tvOS 17.5 - # os: macos-14 - # xcode: 15.4 + - platform: [tvOS, 13] + runtime: tvOS 13.4 + os: macos-12 + xcode: 14.2 + install: true + - platform: [tvOS, 14] + runtime: tvOS 14.5 + os: macos-12 + xcode: 14.2 + install: true + - platform: [tvOS, 15] + runtime: tvOS 15.4 + os: macos-13 + xcode: 15.0.1 + install: true + - platform: [tvOS, 16] + runtime: tvOS 16.4 + os: macos-13 + xcode: 15.0.1 + - platform: [tvOS, 17] + runtime: tvOS 17.5 + os: macos-14 + xcode: 15.4 - platform: [tvOS, 18] runtime: tvOS 18.0 os: macos-14 xcode: 16.0 - # - platform: [watchOS, 8] - # runtime: watchOS 8.5 - # os: macos-13 - # xcode: 15.0.1 - # install: true - # - platform: [watchOS, 9] - # runtime: watchOS 9.4 - # os: macos-13 - # xcode: 14.3.1 - # - platform: [watchOS, 10] - # runtime: watchOS 10.5 - # os: macos-14 - # xcode: 15.4 - # - platform: [watchOS, 11] - # runtime: watchOS 11.0 - # os: macos-14 - # xcode: 16.0 - - # - platform: [macOS, 12] - # runtime: macOS 12 - # os: macos-12 - # xcode: 14.2 - # - platform: [macOS, 13] - # runtime: macOS 13 - # os: macos-13 - # xcode: 15.0.1 + - platform: [watchOS, 8] + runtime: watchOS 8.5 + os: macos-13 + xcode: 15.0.1 + install: true + - platform: [watchOS, 9] + runtime: watchOS 9.4 + os: macos-13 + xcode: 14.3.1 + - platform: [watchOS, 10] + runtime: watchOS 10.5 + os: macos-14 + xcode: 15.4 + - platform: [watchOS, 11] + runtime: watchOS 11.0 + os: macos-14 + xcode: 16.0 + + - platform: [macOS, 12] + runtime: macOS 12 + os: macos-12 + xcode: 14.2 + - platform: [macOS, 13] + runtime: macOS 13 + os: macos-13 + xcode: 15.0.1 # - platform: [macOS, 14] # runtime: macOS 14 # os: macos-14