Skip to content

Commit

Permalink
Set package deployment target to iOS 16
Browse files Browse the repository at this point in the history
  • Loading branch information
r-dent committed Feb 28, 2024
1 parent c20ef95 commit 8359e30
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Documentation/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ During the alpha phase, the app is not in available in the App Store. [Click her

| iOS Version | Swift Version | XCode Version |
| ----------- | ------------- | ------------- |
| >= 17 | >= 5.9 | >= 15 |
| >= 16 | >= 5.9 | >= 15 |

## Installation

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CompilerPluginSupport

let package = Package(
name: "StreamDeckKit",
platforms: [.iOS(.v17)],
platforms: [.iOS(.v16)],
products: [
.library(
name: "StreamDeckKit",
Expand Down
7 changes: 6 additions & 1 deletion Sources/StreamDeckSimulator/Views/SimulatorContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct SimulatorContainer: View {
Text(model.formFactorName).tag(model)
}
}
.onChange(of: productSelection) { _, newValue in
.onChange(of: productSelection) { newValue in
let config = newValue.createConfiguration()
onDeviceChange(newValue, config.device)
configuration = config
Expand Down Expand Up @@ -157,22 +157,27 @@ struct SimulatorContainer: View {
}

#if DEBUG
@available(iOS 17, *)
#Preview("Plus", traits: .fixedLayout(width: 600, height: 600)) {
SimulatorContainer(streamDeck: .plus)
}

@available(iOS 17, *)
#Preview("Mini", traits: .fixedLayout(width: 600, height: 600)) {
SimulatorContainer(streamDeck: .mini)
}

@available(iOS 17, *)
#Preview("Regular", traits: .fixedLayout(width: 600, height: 600)) {
SimulatorContainer(streamDeck: .regular)
}

@available(iOS 17, *)
#Preview("XL", traits: .fixedLayout(width: 600, height: 600)) {
SimulatorContainer(streamDeck: .xl)
}

@available(iOS 17, *)
#Preview("Pedal", traits: .fixedLayout(width: 600, height: 600)) {
SimulatorContainer(streamDeck: .pedal)
}
Expand Down
6 changes: 4 additions & 2 deletions Sources/StreamDeckSimulator/Views/SimulatorDialView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ import SwiftUI

struct SimulatorDialView: View {

@State private var oldValue: Double = 0
@State private var value: Double = 0

let onRotate: (Int) -> Void

var body: some View {
Dial(value: $value)
.aspectRatio(contentMode: .fill)
.onChange(of: value) { oldValue, newValue in
.onChange(of: value) { newValue in
onRotate(Int(newValue) - Int(oldValue))
oldValue = newValue
}
.aspectRatio(1, contentMode: .fit)
}
Expand Down Expand Up @@ -72,7 +74,7 @@ struct SimulatorDialPressButton: View {
.scaleEffect(isPressed ? 0.9 : 1)
.opacity(isPressed ? 0.8 : 1)
.foregroundColor(.white)
.onChange(of: isPressed) {
.onChange(of: isPressed) { _ in
onPress(isPressed)
}
.aspectRatio(1, contentMode: .fit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/StreamDeckSimulator/Views/SimulatorKeyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct SimulatorKeyView: View {
.contentShape(Rectangle())
.frame(maxWidth: .infinity, maxHeight: .infinity)
.gesture(tap)
.onChange(of: isPressed) {
.onChange(of: isPressed) { _ in
client.emit(.keyPress(index: index, pressed: isPressed))
}
.onReceive(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ private extension StreamDeckSimulatorView {
#if DEBUG

// MARK: - Preview

@available(iOS 17, *)
#Preview("Square", traits: .fixedLayout(width: 700, height: 700)) {
Group {
let config = StreamDeckProduct.mini.createConfiguration()
Expand All @@ -262,6 +262,7 @@ private extension StreamDeckSimulatorView {
}
}

@available(iOS 17, *)
#Preview("Landscape", traits: .landscapeLeft) {
Group {
StreamDeckSimulatorView.create(
Expand Down
4 changes: 2 additions & 2 deletions StreamDeckCApi.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
# See: https://github.com/CocoaPods/CocoaPods/issues/12073#issuecomment-1737821281
s.xcconfig = { 'ENABLE_USER_SCRIPT_SANDBOXING' => false }

s.platform = :ios, '17.0'
s.ios.deployment_target = '17'
s.platform = :ios, '16.0'
s.ios.deployment_target = '16'
end
4 changes: 2 additions & 2 deletions StreamDeckKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Pod::Spec.new do |s|
s.source_files = "Sources/#{s.name}/**/*.swift"
s.dependency 'StreamDeckCApi', "#{s.version.to_s}"

s.platform = :ios, '17.0'
s.ios.deployment_target = '17'
s.platform = :ios, '16.0'
s.ios.deployment_target = '16'
end
4 changes: 2 additions & 2 deletions StreamDeckSimulator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
# See: https://medium.com/clutter-engineering/supporting-both-swift-package-manager-and-cocoapods-in-your-library-861f00b6b0f9#8694
s.resource_bundles = { "StreamDeckKit_#{s.name}" => ["Sources/#{s.name}/Resources/**/*"] }

s.platform = :ios, '17.0'
s.ios.deployment_target = '17'
s.platform = :ios, '16.0'
s.ios.deployment_target = '16'
end

0 comments on commit 8359e30

Please sign in to comment.