From ecf84d3f94f19d6e00a6591f3da6aab504fb0518 Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Sun, 10 Nov 2024 13:30:45 +0100 Subject: [PATCH] Fix compilation on macOS --- .github/workflows/build-and-test.yml | 13 ++----------- .../AccessorySetupKit/AccessorySetupKit.swift | 7 +------ 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 924ae9e..b685106 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -39,18 +39,9 @@ jobs: with: runsonlabels: '["macOS", "self-hosted"]' scheme: SpeziBluetooth-Package - destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)' + destination: 'platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)' resultBundle: SpeziBluetooth-watchOS.xcresult artifactname: SpeziBluetooth-watchOS.xcresult - buildandtest_tvos: - name: Build and Test Swift Package tvOS - uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 - with: - runsonlabels: '["macOS", "self-hosted"]' - scheme: SpeziBluetooth-Package - destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' - resultBundle: SpeziBluetooth-tvOS.xcresult - artifactname: SpeziBluetooth-tvOS.xcresult ios: name: Build and Test iOS uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 @@ -78,6 +69,6 @@ jobs: needs: [package_ios, buildandtest_visionos, buildandtest_watchos, buildandtest_tvos, ios, macos] uses: StanfordSpezi/.github/.github/workflows/create-and-upload-coverage-report.yml@v2 with: - coveragereports: SpeziBluetooth-iOS.xcresult SpeziBluetooth-visionOS.xcresult SpeziBluetooth-watchOS.xcresult SpeziBluetooth-tvOS.xcresult TestApp-iOS.xcresult TestApp-macOS.xcresult + coveragereports: SpeziBluetooth-iOS.xcresult SpeziBluetooth-visionOS.xcresult SpeziBluetooth-watchOS.xcresult TestApp-iOS.xcresult TestApp-macOS.xcresult secrets: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Sources/SpeziBluetooth/AccessorySetupKit/AccessorySetupKit.swift b/Sources/SpeziBluetooth/AccessorySetupKit/AccessorySetupKit.swift index 70016c0..a916302 100644 --- a/Sources/SpeziBluetooth/AccessorySetupKit/AccessorySetupKit.swift +++ b/Sources/SpeziBluetooth/AccessorySetupKit/AccessorySetupKit.swift @@ -376,7 +376,7 @@ extension AccessorySetupKit.AccessoryEvent: CustomStringConvertible, CustomDebug @available(macCatalyst, unavailable) extension AccessorySetupKit { /// A supported protocol of the accessory setup kit. - public struct SupportedProtocol { + public struct SupportedProtocol: RawRepresentable, Hashable, Sendable { /// The raw value identifier. public let rawValue: String @@ -393,11 +393,6 @@ extension AccessorySetupKit { } } - -@available(iOS 18.0, *) -@available(macCatalyst, unavailable) -extension AccessorySetupKit.SupportedProtocol: Hashable, Sendable, RawRepresentable {} - @available(iOS 18.0, *) @available(macCatalyst, unavailable) extension AccessorySetupKit.SupportedProtocol {