Skip to content

Commit

Permalink
Remove support for macOS, tvOS and watchOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jun 25, 2024
1 parent 5011ef2 commit 77d93db
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 51 deletions.
46 changes: 1 addition & 45 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ jobs:
scheme: SpeziDevices-Package
resultBundle: SpeziDevices-iOS.xcresult
artifactname: SpeziDevices-iOS.xcresult
packagewatchos:
name: Build and Test Swift Package watchOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: SpeziDevices-Package
destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)'
resultBundle: SpeziDevices-watchOS.xcresult
artifactname: SpeziDevices-watchOS.xcresult
packagevisionos:
name: Build and Test Swift Package visionOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -39,22 +31,6 @@ jobs:
destination: 'platform=visionOS Simulator,name=Apple Vision Pro'
resultBundle: SpeziDevices-visionOS.xcresult
artifactname: SpeziDevices-visionOS.xcresult
packagetvos:
name: Build and Test Swift Package tvOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: SpeziDevices-Package
resultBundle: SpeziDevices-tvOS.xcresult
destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)'
artifactname: SpeziDevices-tvOS.xcresult
packagemacos:
name: Build and Test Swift Package macOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: SpeziDevices-Package
resultBundle: SpeziDevices-macOS.xcresult
destination: 'platform=macOS,arch=arm64'
artifactname: SpeziDevices-macOS.xcresult
ios:
name: Build and Test iOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -74,16 +50,6 @@ jobs:
destination: 'platform=iOS Simulator,name=iPad Air (5th generation)'
resultBundle: TestApp-iPadOS.xcresult
artifactname: TestApp-iPadOS.xcresult
watchos:
name: Build and Test watchOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
path: 'Tests/UITests'
scheme: TestAppWatchApp
destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)'
resultBundle: TestApp-watchOS.xcresult
artifactname: TestApp-watchOS.xcresult
visionos:
name: Build and Test visionOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -94,16 +60,6 @@ jobs:
destination: 'platform=visionOS Simulator,name=Apple Vision Pro'
resultBundle: TestApp-visionOS.xcresult
artifactname: TestApp-visionOS.xcresult
tvos:
name: Build and Test tvOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
path: 'Tests/UITests'
scheme: TestApp
destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)'
resultBundle: TestApp-tvOS.xcresult
artifactname: TestApp-tvOS.xcresult
codeql:
name: CodeQL
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -119,6 +75,6 @@ jobs:
needs: [packageios, packagewatchos, packagevisionos, packagetvos, packagemacos, ios, ipados, watchos, visionos, tvos]
uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: SpeziDevices-iOS.xcresult SpeziDevices-watchOS.xcresult SpeziDevices-visionOS.xcresult SpeziDevices-tvOS.xcresult SpeziDevices-macOS.xcresult TestApp-iOS.xcresult TestApp-iPadOS.xcresult TestApp-watchOS.xcresult TestApp-visionOS.xcresult TestApp-tvOS.xcresult
coveragereports: SpeziDevices-iOS.xcresult SpeziDevices-visionOS.xcresult TestApp-iOS.xcresult TestApp-iPadOS.xcresult TestApp-visionOS.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 1 addition & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ let package = Package(
defaultLocalization: "en",
platforms: [
.iOS(.v17),
.watchOS(.v10),
.visionOS(.v1),
.tvOS(.v17),
.macOS(.v14)
.visionOS(.v1)
],
products: [
.library(name: "SpeziDevices", targets: ["SpeziDevices"]),
Expand Down
6 changes: 6 additions & 0 deletions Sources/SpeziDevices/Model/ImageReference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ extension ImageReference {
case let .system(name):
return Image(systemName: name)
case let .asset(name, bundle: bundle):
#if os(iOS) || os(visionOS) || os(tvOS)
guard UIImage(named: name, in: bundle, with: nil) != nil else {
return nil
}
#elseif os(macOS)
guard NSImage(named: name) != nil else {
return nil
}
#endif
return Image(name, bundle: bundle)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/SpeziDevicesUI/Pairing/AccessoryImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct AccessoryImageView: View {
.symbolRenderingMode(.hierarchical) // set symbol rendering mode if one uses sf symbols
.frame(maxWidth: 250, maxHeight: 120)
}
.frame(maxWidth: .infinity, maxHeight: 150) // make drag-able area a bit larger
.background(Color(uiColor: .systemBackground)) // we need to set a non-clear color for it to be drag-able
.frame(maxWidth: .infinity, maxHeight: 150) // make drag-able area a bit larger
.background(Color(uiColor: .systemBackground)) // we need to set a non-clear color for it to be drag-able
}


Expand Down

0 comments on commit 77d93db

Please sign in to comment.