Build Information
Failed to build LongPressButton, reference main (90f8be
), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 04:17:47 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
Build Log
========================================
RunAll
========================================
Builder version: 4.61.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: $PWD/.spi.yml
SUCCESS checkout https://github.com/Tunous/LongPressButton.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "longpressbutton",
"name": "LongPressButton",
"url": "https://github.com/Tunous/LongPressButton.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/LongPressButton",
"dependencies": [
]
}
]
}
Fetching https://github.com/Tunous/LongPressButton.git
[1/57] Fetching longpressbutton
Fetched https://github.com/Tunous/LongPressButton.git from cache (0.57s)
Creating working copy for https://github.com/Tunous/LongPressButton.git
Working copy of https://github.com/Tunous/LongPressButton.git resolved at main (90f8bef)
warning: '.resolve-product-dependencies': dependency 'longpressbutton' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/Tunous/LongPressButton.git
https://github.com/Tunous/LongPressButton.git
{
"dependencies" : [
],
"manifest_display_name" : "LongPressButton",
"name" : "LongPressButton",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "LongPressButton",
"targets" : [
"LongPressButton"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "LongPressButtonTests",
"module_type" : "SwiftTarget",
"name" : "LongPressButtonTests",
"path" : "Tests/LongPressButtonTests",
"sources" : [
"LongPressButtonTests.swift"
],
"target_dependencies" : [
"LongPressButton"
],
"type" : "test"
},
{
"c99name" : "LongPressButton",
"module_type" : "SwiftTarget",
"name" : "LongPressButton",
"path" : "Sources/LongPressButton",
"product_memberships" : [
"LongPressButton"
],
"sources" : [
"LongPressButton.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.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: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 | }
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/3] 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,
[3/3] 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: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.1 macosSpm