Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ package struct TypesMatch<Left, Right>: ViewInputPredicate {
package init() {}
}

#if OPENSWIFTUI_RELEASE_2024

package struct IsVisionEnabledPredicate: ViewInputPredicate {
package static func evaluate(inputs: _GraphInputs) -> Bool {
#if os(macOS)
Expand All @@ -136,3 +138,5 @@ extension _ViewListInputs {
IsVisionEnabledPredicate.evaluate(inputs: base)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading