diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 152639f92..a92f095ff 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -29,7 +29,7 @@ jobs: OPENSWIFTUI_TARGET_RELEASE: ${{ matrix.release }} OPENSWIFTUI_USE_LOCAL_DEPS: 1 OPENGRAPH_TARGET_RELEASE: ${{ matrix.release }} - OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE-${{ matrix.release }} + OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE_${{ matrix.release }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 16f882ab4..17e948616 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,7 +25,7 @@ jobs: OPENSWIFTUI_TARGET_RELEASE: ${{ matrix.release }} OPENSWIFTUI_USE_LOCAL_DEPS: 1 OPENGRAPH_TARGET_RELEASE: ${{ matrix.release }} - OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE-${{ matrix.release }} + OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE_${{ matrix.release }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 diff --git a/Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift b/Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift index 616d92acd..f7c9083a5 100644 --- a/Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift +++ b/Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift @@ -114,6 +114,8 @@ package struct TypesMatch: ViewInputPredicate { package init() {} } +#if OPENSWIFTUI_RELEASE_2024 + package struct IsVisionEnabledPredicate: ViewInputPredicate { package static func evaluate(inputs: _GraphInputs) -> Bool { #if os(macOS) @@ -136,3 +138,5 @@ extension _ViewListInputs { IsVisionEnabledPredicate.evaluate(inputs: base) } } + +#endif diff --git a/Tests/OpenSwiftUITests/View/InterfaceIdiom/InterfaceIdiomTests.swift b/Tests/OpenSwiftUITests/View/InterfaceIdiom/InterfaceIdiomTests.swift index 26dd309e8..46067d350 100644 --- a/Tests/OpenSwiftUITests/View/InterfaceIdiom/InterfaceIdiomTests.swift +++ b/Tests/OpenSwiftUITests/View/InterfaceIdiom/InterfaceIdiomTests.swift @@ -12,14 +12,27 @@ struct InterfaceIdiomTests { #if os(iOS) || os(tvOS) @Test func interfaceIdiom() throws { + #if OPENSWIFTUI_RELEASE_2021 + #expect(UIUserInterfaceIdiom.unspecified.idiom == nil) + #expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiomType.phone) + #expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiomType.pad) + #expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiomType.tv) + #expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiomType.carplay) + #expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiomType.watch) + #expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiomType.mac) + if #available(iOS 17, tvOS 17, *) { + #expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiomType.vision) + } + #elseif OPENSWIFTUI_RELEASE_2024 #expect(UIUserInterfaceIdiom.unspecified.idiom == nil) #expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiom(.phone)) #expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiom(.pad)) #expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiom(.tv)) #expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay)) #expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiom(.watch)) - #expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay)) + #expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiom(.mac)) #expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiom(.vision)) + #endif } #endif }