diff --git a/Sources/FortuneWheel/FortuneWheel.swift b/Sources/FortuneWheel/FortuneWheel.swift index 78dd51a..a5aa225 100644 --- a/Sources/FortuneWheel/FortuneWheel.swift +++ b/Sources/FortuneWheel/FortuneWheel.swift @@ -7,6 +7,7 @@ import SwiftUI +@available(macOS 11.0, *) @available(iOS 14.0, *) public struct FortuneWheel: View { @@ -57,6 +58,7 @@ public struct FortuneWheel: View { } } +@available(macOS 10.15, *) @available(iOS 13.0, *) extension Color { diff --git a/Sources/FortuneWheel/FortuneWheelViewModel.swift b/Sources/FortuneWheel/FortuneWheelViewModel.swift index d37a6e6..bb13be6 100644 --- a/Sources/FortuneWheel/FortuneWheelViewModel.swift +++ b/Sources/FortuneWheel/FortuneWheelViewModel.swift @@ -7,6 +7,7 @@ import SwiftUI +@available(macOS 10.15, *) @available(iOS 13.0, *) class FortuneWheelViewModel: ObservableObject { diff --git a/Sources/FortuneWheel/SpinWheel/SpinWheelCell.swift b/Sources/FortuneWheel/SpinWheel/SpinWheelCell.swift index dddce84..0b26c21 100644 --- a/Sources/FortuneWheel/SpinWheel/SpinWheelCell.swift +++ b/Sources/FortuneWheel/SpinWheel/SpinWheelCell.swift @@ -7,6 +7,7 @@ import SwiftUI +@available(macOS 10.15, *) @available(iOS 13.0, *) struct SpinWheelCell: Shape { diff --git a/Sources/FortuneWheel/SpinWheel/SpinWheelView.swift b/Sources/FortuneWheel/SpinWheel/SpinWheelView.swift index 96b2556..17de7c3 100644 --- a/Sources/FortuneWheel/SpinWheel/SpinWheelView.swift +++ b/Sources/FortuneWheel/SpinWheel/SpinWheelView.swift @@ -7,6 +7,7 @@ import SwiftUI +@available(macOS 10.15, *) @available(iOS 13.0, *) struct Triangle: Shape { public func path(in rect: CGRect) -> Path { @@ -20,6 +21,7 @@ struct Triangle: Shape { } } +@available(macOS 10.15, *) @available(iOS 13.0, *) struct SpinWheelPointer: View { var pointerColor: Color @@ -31,6 +33,7 @@ struct SpinWheelPointer: View { } } +@available(macOS 10.15, *) @available(iOS 13.0, *) struct SpinWheelBolt: View { var body: some View { @@ -44,6 +47,7 @@ struct SpinWheelBolt: View { } } +@available(macOS 10.15, *) @available(iOS 13.0, *) struct SpinWheelView: View { @@ -51,12 +55,14 @@ struct SpinWheelView: View { private let colors: [Color] private let sliceOffset: Double = -.pi / 2 + @available(macOS 10.15, *) init(data: [Double], labels: [String], colors: [Color]) { self.data = data self.labels = labels self.colors = colors } + @available(macOS 10.15.0, *) var body: some View { GeometryReader { geo in diff --git a/Tests/FortuneWheelTests/FortuneWheelTests.swift b/Tests/FortuneWheelTests/FortuneWheelTests.swift index ff7d7fc..609e23d 100644 --- a/Tests/FortuneWheelTests/FortuneWheelTests.swift +++ b/Tests/FortuneWheelTests/FortuneWheelTests.swift @@ -6,7 +6,7 @@ final class FortuneWheelTests: XCTestCase { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. - XCTAssertEqual(FortuneWheel().text, "Hello, World!") + XCTAssertEqual(FortuneWheel(titles: [], size: 200, onSpinEnd: {_ in}).text, "Hello, World!") } static var allTests = [