diff --git a/.github/workflows/build-test-and-docs.yml b/.github/workflows/build-test-and-docs.yml index a9e983a40..bc0d77b32 100644 --- a/.github/workflows/build-test-and-docs.yml +++ b/.github/workflows/build-test-and-docs.yml @@ -126,6 +126,44 @@ jobs: xcodebuild: true xcodebuild-device-type: ${{ matrix.device-type }} + uikit-catalyst: + runs-on: macos-14 + steps: + - name: Force Xcode 15.4 + run: sudo xcode-select -switch /Applications/Xcode_15.4.app + + - name: Swift version + run: swift --version + + - name: Install xcbeautify + run: brew install xcbeautify + + - uses: actions/checkout@v3 + + - name: Build + run: | + set -uxo pipefail + buildtarget () { + # Use the same derived data path as DocC compilation so that we don't duplicate work. + xcodebuild -derivedDataPath /tmp/data -skipMacroValidation -scheme "$1" -destination "variant=Mac Catalyst,arch=arm64,platform=macOS" build | xcbeautify --renderer github-actions + } + + buildtarget SwiftCrossUI + buildtarget UIKitBackend + + cd Examples + + buildtarget CounterExample + buildtarget GreetingGeneratorExample + buildtarget NavigationExample + buildtarget StressTestExample + buildtarget NotesExample + buildtarget PathsExample + buildtarget ControlsExample + buildtarget RandomNumberGeneratorExample + # TODO test whether this works on Catalyst + # buildtarget SplitExample + windows: runs-on: windows-latest defaults: diff --git a/Package.resolved b/Package.resolved index 576739ad3..64f3c56d5 100644 --- a/Package.resolved +++ b/Package.resolved @@ -129,8 +129,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/the-swift-collective/zlib.git", "state" : { - "revision" : "f35d438c14187cb369dfd82603c3427dc66fbed5", - "version" : "1.3.1" + "revision" : "f1d153b90420f9fcc6ef916cd67ea96f0e68d137", + "version" : "1.3.2" } } ], diff --git a/Sources/UIKitBackend/UIKitBackend+Picker.swift b/Sources/UIKitBackend/UIKitBackend+Picker.swift index d2ba674cb..7554a29a9 100644 --- a/Sources/UIKitBackend/UIKitBackend+Picker.swift +++ b/Sources/UIKitBackend/UIKitBackend+Picker.swift @@ -142,7 +142,7 @@ final class UITableViewPicker: WrapperWidget, Picker, UITableViewDe extension UIKitBackend { public func createPicker() -> Widget { #if targetEnvironment(macCatalyst) - if UIDevice.current.userInterfaceIdiom == .mac { + if #available(macCatalyst 14, *), UIDevice.current.userInterfaceIdiom == .mac { return UITableViewPicker() } else { return UIPickerViewPicker()