Build Information
Failed to build LongPressButton with Swift 6.0 for macOS (SPM).
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Tunous/LongPressButton.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Tunous/LongPressButton
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 90f8bef Change actions order
Cloned https://github.com/Tunous/LongPressButton.git
Revision (git rev-parse @):
90f8befd7c943c2c99e4c665f805cd92d62fb83a
SPI manifest file found: $workDir/.spi.yml
SUCCESS checkout https://github.com/Tunous/LongPressButton.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/Tunous/LongPressButton.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module LongPressButton
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:11:6: error: 'State' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
9 | private let label: Label
10 |
11 | @State private var didLongPress = false
| `- error: 'State' is only available in macOS 10.15 or newer
12 | @State private var longPressTask: Task<Void, Never>?
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:12:39: error: 'Task' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
10 |
11 | @State private var didLongPress = false
12 | @State private var longPressTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
13 |
14 | public var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:12:6: error: 'State' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
10 |
11 | @State private var didLongPress = false
12 | @State private var longPressTask: Task<Void, Never>?
| `- error: 'State' is only available in macOS 10.15 or newer
13 |
14 | public var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:14:27: error: 'View' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
12 | @State private var longPressTask: Task<Void, Never>?
13 |
14 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
15 | Button(action: performActionIfNeeded) {
16 | label
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:4:38: error: 'View' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:70:10: error: 'ViewBuilder' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
63 | /// - longPressAction: The action to perform when the user long presses the button.
64 | /// - label: A view that describes the purpose of the button’s action.
65 | public init(
| `- note: add @available attribute to enclosing initializer
66 | minimumDuration: TimeInterval = 0.5,
67 | maximumDistance: CGFloat = 10,
68 | action: @escaping () -> Void,
69 | longPressAction: @escaping () -> Void,
70 | @ViewBuilder label: () -> Label
| `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
71 | ) {
72 | self.minimumDuration = minimumDuration
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:94:22: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
92 | action: @escaping () -> Void,
93 | longPressAction: @escaping () -> Void
94 | ) where Label == Text {
| `- error: 'Text' is only available in macOS 10.15 or newer
95 | self.init(
96 | minimumDuration: minimumDuration,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:89:21: error: 'LocalizedStringKey' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
| `- error: 'LocalizedStringKey' is only available in macOS 10.15 or newer
90 | minimumDuration: TimeInterval = 0.5,
91 | maximumDistance: CGFloat = 10,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:120:22: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
118 | action: @escaping () -> Void,
119 | longPressAction: @escaping () -> Void
120 | ) where Label == Text {
| `- error: 'Text' is only available in macOS 10.15 or newer
121 | self.init(
122 | minimumDuration: minimumDuration,
[4/4] Compiling LongPressButton LongPressButton.swift
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:11:6: error: 'State' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
9 | private let label: Label
10 |
11 | @State private var didLongPress = false
| `- error: 'State' is only available in macOS 10.15 or newer
12 | @State private var longPressTask: Task<Void, Never>?
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:12:39: error: 'Task' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
10 |
11 | @State private var didLongPress = false
12 | @State private var longPressTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
13 |
14 | public var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:12:6: error: 'State' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
10 |
11 | @State private var didLongPress = false
12 | @State private var longPressTask: Task<Void, Never>?
| `- error: 'State' is only available in macOS 10.15 or newer
13 |
14 | public var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:14:27: error: 'View' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
12 | @State private var longPressTask: Task<Void, Never>?
13 |
14 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
15 | Button(action: performActionIfNeeded) {
16 | label
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:4:38: error: 'View' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:70:10: error: 'ViewBuilder' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
63 | /// - longPressAction: The action to perform when the user long presses the button.
64 | /// - label: A view that describes the purpose of the button’s action.
65 | public init(
| `- note: add @available attribute to enclosing initializer
66 | minimumDuration: TimeInterval = 0.5,
67 | maximumDistance: CGFloat = 10,
68 | action: @escaping () -> Void,
69 | longPressAction: @escaping () -> Void,
70 | @ViewBuilder label: () -> Label
| `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
71 | ) {
72 | self.minimumDuration = minimumDuration
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:94:22: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
92 | action: @escaping () -> Void,
93 | longPressAction: @escaping () -> Void
94 | ) where Label == Text {
| `- error: 'Text' is only available in macOS 10.15 or newer
95 | self.init(
96 | minimumDuration: minimumDuration,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:89:21: error: 'LocalizedStringKey' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
| `- error: 'LocalizedStringKey' is only available in macOS 10.15 or newer
90 | minimumDuration: TimeInterval = 0.5,
91 | maximumDistance: CGFloat = 10,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:120:22: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
118 | action: @escaping () -> Void,
119 | longPressAction: @escaping () -> Void
120 | ) where Label == Text {
| `- error: 'Text' is only available in macOS 10.15 or newer
121 | self.init(
122 | minimumDuration: minimumDuration,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:15:9: error: 'Button' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
12 | @State private var longPressTask: Task<Void, Never>?
13 |
14 | public var body: some View {
| `- note: add @available attribute to enclosing property
15 | Button(action: performActionIfNeeded) {
| |- error: 'Button' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | label
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:18:10: error: 'onLongPressGesture(minimumDuration:maximumDistance:perform:onPressingChanged:)' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
12 | @State private var longPressTask: Task<Void, Never>?
13 |
14 | public var body: some View {
| `- note: add @available attribute to enclosing property
15 | Button(action: performActionIfNeeded) {
16 | label
17 | }
18 | .onLongPressGesture(
| |- error: 'onLongPressGesture(minimumDuration:maximumDistance:perform:onPressingChanged:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
19 | maximumDistance: maximumDistance,
20 | perform: {},
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:26:24: error: 'cancel()' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
23 | }
24 |
25 | private func performActionIfNeeded() {
| `- note: add @available attribute to enclosing instance method
26 | longPressTask?.cancel()
| |- error: 'cancel()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
27 | if didLongPress {
28 | didLongPress = false
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:28:13: error: setter for 'didLongPress' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
23 | }
24 |
25 | private func performActionIfNeeded() {
| `- note: add @available attribute to enclosing instance method
26 | longPressTask?.cancel()
27 | if didLongPress {
28 | didLongPress = false
| |- error: setter for 'didLongPress' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | } else {
30 | action?()
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:35:24: error: 'cancel()' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
| |- error: 'cancel()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
36 | guard isPressing else { return }
37 | didLongPress = false
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:37:9: error: setter for 'didLongPress' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
37 | didLongPress = false
| |- error: setter for 'didLongPress' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
38 | longPressTask = Task {
39 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:38:9: error: setter for 'longPressTask' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
37 | didLongPress = false
38 | longPressTask = Task {
| |- error: setter for 'longPressTask' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:38:25: error: 'Task' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
37 | didLongPress = false
38 | longPressTask = Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:38:25: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
37 | didLongPress = false
38 | longPressTask = Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:40:27: error: 'Task' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
:
38 | longPressTask = Task {
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
41 | } catch {
42 | return
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:40:32: error: 'sleep(nanoseconds:)' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
:
38 | longPressTask = Task {
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
| |- error: 'sleep(nanoseconds:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
41 | } catch {
42 | return
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:44:19: error: 'MainActor' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
:
42 | return
43 | }
44 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
45 | didLongPress = true
46 | longPressAction()
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:44:29: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
:
42 | return
43 | }
44 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
45 | didLongPress = true
46 | longPressAction()
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:45:17: error: setter for 'didLongPress' is only available in macOS 10.15 or newer
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: add @available attribute to enclosing generic struct
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
32 | }
33 |
34 | private func handleLongPress(isPressing: Bool) {
| `- note: add @available attribute to enclosing instance method
35 | longPressTask?.cancel()
36 | guard isPressing else { return }
:
43 | }
44 | await MainActor.run {
45 | didLongPress = true
| |- error: setter for 'didLongPress' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 | longPressAction()
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:40:58: warning: capture of 'self' with non-sendable type 'LongPressButton<Label>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: consider making generic struct 'LongPressButton' conform to the 'Sendable' protocol
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
38 | longPressTask = Task {
39 | do {
40 | try await Task.sleep(nanoseconds: UInt64(minimumDuration * 1_000_000_000))
| `- warning: capture of 'self' with non-sendable type 'LongPressButton<Label>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
41 | } catch {
42 | return
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:45:17: warning: capture of 'self' with non-sendable type 'LongPressButton<Label>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 |
3 | /// A control that initiates action on tap or long press.
4 | public struct LongPressButton<Label: View>: View {
| `- note: consider making generic struct 'LongPressButton' conform to the 'Sendable' protocol
5 | private let minimumDuration: TimeInterval
6 | private let maximumDistance: CGFloat
:
43 | }
44 | await MainActor.run {
45 | didLongPress = true
| `- warning: capture of 'self' with non-sendable type 'LongPressButton<Label>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | longPressAction()
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:95:14: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
93 | longPressAction: @escaping () -> Void
94 | ) where Label == Text {
95 | self.init(
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
96 | minimumDuration: minimumDuration,
97 | maximumDistance: maximumDistance,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:101:13: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
99 | longPressAction: longPressAction
100 | ) {
101 | Text(titleKey)
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
102 | }
103 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:101:13: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
99 | longPressAction: longPressAction
100 | ) {
101 | Text(titleKey)
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
102 | }
103 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:101:13: error: 'init(_:tableName:bundle:comment:)' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
99 | longPressAction: longPressAction
100 | ) {
101 | Text(titleKey)
| |- error: 'init(_:tableName:bundle:comment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
102 | }
103 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:100:11: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
86 | /// - action: The action to perform when the user taps the button.
87 | /// - longPressAction: The action to perform when the user long presses the button.
88 | public init(
| `- note: add @available attribute to enclosing initializer
89 | _ titleKey: LocalizedStringKey,
90 | minimumDuration: TimeInterval = 0.5,
:
98 | action: action,
99 | longPressAction: longPressAction
100 | ) {
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
101 | Text(titleKey)
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:121:14: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
119 | longPressAction: @escaping () -> Void
120 | ) where Label == Text {
121 | self.init(
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
122 | minimumDuration: minimumDuration,
123 | maximumDistance: maximumDistance,
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:127:13: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
125 | longPressAction: longPressAction
126 | ) {
127 | Text(title)
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
128 | }
129 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:127:13: error: 'Text' is only available in macOS 10.15 or newer
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
125 | longPressAction: longPressAction
126 | ) {
127 | Text(title)
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
128 | }
129 | }
/Users/admin/builder/spi-builder-workspace/Sources/LongPressButton/LongPressButton.swift:126:11: warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
52 | // MARK: - Initialization
53 |
54 | extension LongPressButton {
| `- note: add @available attribute to enclosing extension
55 |
56 | /// Creates a long press button that displays a custom label.
:
112 | /// - action: The action to perform when the user taps the button.
113 | /// - longPressAction: The action to perform when the user long presses the button.
114 | public init<S: StringProtocol>(
| `- note: add @available attribute to enclosing initializer
115 | _ title: S,
116 | minimumDuration: TimeInterval = 0.5,
:
124 | action: action,
125 | longPressAction: longPressAction
126 | ) {
| |- warning: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
127 | Text(title)
128 | }
BUILD FAILURE 6.0 macosSpm