Build Information
Failed to build Helper4Swift, reference master (7f3cad
), with Swift 6.0 for macOS (SPM) on 12 Aug 2025 23:54:11 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64
Build Log
========================================
RunAll
========================================
Builder version: 4.65.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/cs4alhaider/Helper4Swift.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/cs4alhaider/Helper4Swift
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 7f3cade Refactor: Organize extensions into categorized subfolders
Cloned https://github.com/cs4alhaider/Helper4Swift.git
Revision (git rev-parse @):
7f3cade1e0ef35c4afabc67c0e758aa4a7458ddd
SUCCESS checkout https://github.com/cs4alhaider/Helper4Swift.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/cs4alhaider/Helper4Swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-5BDAB9E9C0126B9D.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/40] Emitting module Helper4Swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:348:23: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:24: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:57: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:25:60: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | Binding(
27 | get: { self.wrappedValue },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:18:18: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:47:35: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
49 | set: { _ in self.wrappedValue = nil })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:62:91: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
64 | set: { self.wrappedValue = setter($0) })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:76:55: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:91:58: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
93 | set: { present in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:37:11: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:118:25: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
120 | set: { self.wrappedValue = !$0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:109:11: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:135:50: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
137 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:125:11: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:175:55: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
177 | set: { wrappedValue[contains: element] = $0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:165:11: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:13:23: error: cannot find type 'UIColor' in scope
11 | public extension Color {
12 |
13 | func uiColor() -> UIColor {
| `- error: cannot find type 'UIColor' in scope
14 |
15 | if #available(iOS 14.0, *) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:11:18: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | @available(iOS 13.0, *)
11 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | func uiColor() -> UIColor {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:41:18: error: 'Color' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:103:14: error: 'AsyncSequence' is only available in macOS 10.15 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
:
99 | /// }
100 | /// ```
101 | func stream<Value: Sendable>(
| `- note: add @available attribute to enclosing instance method
102 | of keyPath: KeyPath<Self, Value>
103 | ) -> any AsyncSequence<Value, Never> {
| `- error: 'AsyncSequence' is only available in macOS 10.15 or newer
104 | Observations {
105 | self[keyPath: keyPath]
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:76:18: error: 'Observable' is only available in macOS 14.0 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| | `- error: 'Observable' is only available in macOS 14.0 or newer
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
[4/44] Compiling Helper4Swift UIApplication+Extension.swift
[5/44] Compiling Helper4Swift UIButton+Extension.swift
[6/44] Compiling Helper4Swift UICollectionView+Extension.swift
[7/44] Compiling Helper4Swift UIColor+Extension.swift
[8/44] Compiling Helper4Swift UIViewController+Extension.swift
[9/44] Compiling Helper4Swift UIViewController+LocalAuthentication+Extension.swift
[10/44] Compiling Helper4Swift Helper4Swift.swift
[11/44] Compiling Helper4Swift UIViewFromNib.swift
[12/44] Compiling Helper4Swift UITextField+Extension.swift
[13/44] Compiling Helper4Swift UITextView+Extension.swift
[14/44] Compiling Helper4Swift UIView+Extension.swift
[15/44] Compiling Helper4Swift UIViewAutoLayout+Extension.swift
[16/44] Compiling Helper4Swift CheckedContinuation+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:15:13: error: 'resume()' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
| `- note: add @available attribute to enclosing instance method
12 | if let error = error {
13 | resume(throwing: error)
14 | } else {
15 | resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:74:25: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
74 | let formatter = RelativeDateTimeFormatter()
| |- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 | formatter.locale = locale
76 | formatter.unitsStyle = unitsStyle
[17/44] Compiling Helper4Swift Dispatch+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:15:13: error: 'resume()' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
| `- note: add @available attribute to enclosing instance method
12 | if let error = error {
13 | resume(throwing: error)
14 | } else {
15 | resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:74:25: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
74 | let formatter = RelativeDateTimeFormatter()
| |- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 | formatter.locale = locale
76 | formatter.unitsStyle = unitsStyle
[18/44] Compiling Helper4Swift Array+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:15:13: error: 'resume()' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
| `- note: add @available attribute to enclosing instance method
12 | if let error = error {
13 | resume(throwing: error)
14 | } else {
15 | resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:74:25: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
74 | let formatter = RelativeDateTimeFormatter()
| |- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 | formatter.locale = locale
76 | formatter.unitsStyle = unitsStyle
[19/44] Compiling Helper4Swift Bundle+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:15:13: error: 'resume()' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
| `- note: add @available attribute to enclosing instance method
12 | if let error = error {
13 | resume(throwing: error)
14 | } else {
15 | resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:74:25: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
74 | let formatter = RelativeDateTimeFormatter()
| |- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 | formatter.locale = locale
76 | formatter.unitsStyle = unitsStyle
[20/44] Compiling Helper4Swift Date+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:10:18: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| | `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
12 | if let error = error {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Concurrency/CheckedContinuation+Extension.swift:15:13: error: 'resume()' is only available in macOS 10.15 or newer
8 | import Foundation
9 |
10 | public extension CheckedContinuation where T == Void {
| `- note: add @available attribute to enclosing extension
11 | func resume(withErrorIfExist error: E?) {
| `- note: add @available attribute to enclosing instance method
12 | if let error = error {
13 | resume(throwing: error)
14 | } else {
15 | resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:71:21: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
| `- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/Date+Extension.swift:74:25: error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
27 | }
28 |
29 | public extension Date {
| `- note: add @available attribute to enclosing extension
30 |
31 | /// Getting the current date in selected format
:
67 |
68 | /// https://developer.apple.com/documentation/foundation/relativedatetimeformatter
69 | func relativeTime(
| `- note: add @available attribute to enclosing instance method
70 | in locale: Locale = .current,
71 | unitsStyle: RelativeDateTimeFormatter.UnitsStyle = .short,
72 | relativeTo otherDate: Date = Date()
73 | ) -> String {
74 | let formatter = RelativeDateTimeFormatter()
| |- error: 'RelativeDateTimeFormatter' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 | formatter.locale = locale
76 | formatter.unitsStyle = unitsStyle
[21/44] Compiling Helper4Swift TimeInterval+Extension.swift
[22/44] Compiling Helper4Swift URL+Extension.swift
[23/44] Compiling Helper4Swift CLLocationCoordinate2D+Extension.swift
[24/44] Compiling Helper4Swift MKCoordinateSpan+Extension.swift
[25/44] Compiling Helper4Swift NSMutableAttributedString+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:348:23: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:353:21: error: 'currentIndex' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
351 |
352 | if hex.hasPrefix("#") {
353 | scanner.currentIndex = hex.index(after: hex.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
354 | }
355 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
[26/44] Compiling Helper4Swift Optional+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:348:23: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:353:21: error: 'currentIndex' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
351 |
352 | if hex.hasPrefix("#") {
353 | scanner.currentIndex = hex.index(after: hex.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
354 | }
355 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
[27/44] Compiling Helper4Swift Sequence+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:348:23: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:353:21: error: 'currentIndex' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
351 |
352 | if hex.hasPrefix("#") {
353 | scanner.currentIndex = hex.index(after: hex.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
354 | }
355 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
[28/44] Compiling Helper4Swift String+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:348:23: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:353:21: error: 'currentIndex' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
351 |
352 | if hex.hasPrefix("#") {
353 | scanner.currentIndex = hex.index(after: hex.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
354 | }
355 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'Color' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/Foundation/String+Extension.swift:368:16: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
344 | }
345 |
346 | public extension String {
| `- note: add @available attribute to enclosing extension
347 | // Initialize Color from Hex String
348 | func toColor() -> Color {
| `- note: add @available attribute to enclosing instance method
349 | let hex = self.trimmingCharacters(in: .whitespacesAndNewlines)
350 | let scanner = Scanner(string: hex)
:
366 | let blue = CGFloat(b) / 255
367 |
368 | return Color(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
369 | }
370 | }
[29/44] Compiling Helper4Swift UINavigationController+Extension.swift
[30/44] Compiling Helper4Swift UIStoryboard+Extension.swift
[31/44] Compiling Helper4Swift UITabBarController+Extension.swift
[32/44] Compiling Helper4Swift UITableView+Extension.swift
[33/44] Compiling Helper4Swift Dictionary+Extension.swift
[34/44] Compiling Helper4Swift Encodable+Extension.swift
[35/44] Compiling Helper4Swift Int+Extension.swift
[36/44] Compiling Helper4Swift JSONDecoder+Extension.swift
[37/44] Compiling Helper4Swift UIImage+Extension.swift
[38/44] Compiling Helper4Swift UIImageView+Extension.swift
[39/44] Compiling Helper4Swift UIKeyboardType+Extension.swift
[40/44] Compiling Helper4Swift UILabel+Extension.swift
[41/44] Compiling Helper4Swift Binding+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:24: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:57: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:25:60: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | Binding(
27 | get: { self.wrappedValue },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:18:18: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:47:35: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
49 | set: { _ in self.wrappedValue = nil })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:62:91: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
64 | set: { self.wrappedValue = setter($0) })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:76:55: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:91:58: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
93 | set: { present in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:37:11: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:118:25: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
120 | set: { self.wrappedValue = !$0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:109:11: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:135:50: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
137 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:125:11: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:175:55: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
177 | set: { wrappedValue[contains: element] = $0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:165:11: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:11:5: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| `- note: add @available attribute to enclosing operator function
11 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
12 | get: { lhs.wrappedValue ?? rhs },
13 | set: { lhs.wrappedValue = $0 }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:26:9: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
26 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
27 | get: { self.wrappedValue },
28 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:48:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
49 | set: { _ in self.wrappedValue = nil })
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:63:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | set: { self.wrappedValue = setter($0) })
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:79:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
79 | return Binding(get: { self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
80 | set: { bounce.send($0) })
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:92:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | set: { present in
94 | if present {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:119:16: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | set: { self.wrappedValue = !$0 })
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:136:16: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
137 | set: { newValue in
138 | if newValue && !wrappedValue.contains(substring) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:176:16: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
177 | set: { wrappedValue[contains: element] = $0 })
178 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:13:23: error: cannot find type 'UIColor' in scope
11 | public extension Color {
12 |
13 | func uiColor() -> UIColor {
| `- error: cannot find type 'UIColor' in scope
14 |
15 | if #available(iOS 14.0, *) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:11:18: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | @available(iOS 13.0, *)
11 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | func uiColor() -> UIColor {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:41:18: error: 'Color' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:49:23: error: cannot find 'UIColor' in scope
47 | func toHexString() -> String? {
48 | // Convert the Color to UIColor
49 | let uiColor = UIColor(self)
| `- error: cannot find 'UIColor' in scope
50 |
51 | // Extract RGBA components from UIColor
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:77:21: error: 'currentIndex' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
75 |
76 | if hexString.hasPrefix("#") {
77 | scanner.currentIndex = hexString.index(after: hexString.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | }
79 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:92:14: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
:
90 | let blue = CGFloat(b) / 255
91 |
92 | self.init(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | }
94 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:103:32: error: cannot find 'UIColor' in scope
101 | func isDarkColor() -> Bool {
102 | // Extract RGB components from the color
103 | guard let components = UIColor(self).cgColor.components, components.count >= 3 else {
| `- error: cannot find 'UIColor' in scope
104 | return false
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:103:14: error: 'AsyncSequence' is only available in macOS 10.15 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
:
99 | /// }
100 | /// ```
101 | func stream<Value: Sendable>(
| `- note: add @available attribute to enclosing instance method
102 | of keyPath: KeyPath<Self, Value>
103 | ) -> any AsyncSequence<Value, Never> {
| `- error: 'AsyncSequence' is only available in macOS 10.15 or newer
104 | Observations {
105 | self[keyPath: keyPath]
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:76:18: error: 'Observable' is only available in macOS 14.0 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| | `- error: 'Observable' is only available in macOS 14.0 or newer
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:19: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:59:17: error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
59 | withObservationTracking {
| |- error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
60 | continuation.resume(returning: observationClosure())
61 | } onChange: {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:44: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:43: note: expanded code originates here
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift
|56 |
|57 |
|58 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+------------------------------------------------------------------------------------------------------------------
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
[42/44] Compiling Helper4Swift Color+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:24: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:57: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:25:60: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | Binding(
27 | get: { self.wrappedValue },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:18:18: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:47:35: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
49 | set: { _ in self.wrappedValue = nil })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:62:91: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
64 | set: { self.wrappedValue = setter($0) })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:76:55: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:91:58: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
93 | set: { present in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:37:11: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:118:25: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
120 | set: { self.wrappedValue = !$0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:109:11: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:135:50: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
137 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:125:11: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:175:55: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
177 | set: { wrappedValue[contains: element] = $0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:165:11: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:11:5: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| `- note: add @available attribute to enclosing operator function
11 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
12 | get: { lhs.wrappedValue ?? rhs },
13 | set: { lhs.wrappedValue = $0 }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:26:9: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
26 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
27 | get: { self.wrappedValue },
28 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:48:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
49 | set: { _ in self.wrappedValue = nil })
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:63:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | set: { self.wrappedValue = setter($0) })
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:79:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
79 | return Binding(get: { self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
80 | set: { bounce.send($0) })
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:92:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | set: { present in
94 | if present {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:119:16: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | set: { self.wrappedValue = !$0 })
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:136:16: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
137 | set: { newValue in
138 | if newValue && !wrappedValue.contains(substring) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:176:16: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
177 | set: { wrappedValue[contains: element] = $0 })
178 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:13:23: error: cannot find type 'UIColor' in scope
11 | public extension Color {
12 |
13 | func uiColor() -> UIColor {
| `- error: cannot find type 'UIColor' in scope
14 |
15 | if #available(iOS 14.0, *) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:11:18: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | @available(iOS 13.0, *)
11 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | func uiColor() -> UIColor {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:41:18: error: 'Color' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:49:23: error: cannot find 'UIColor' in scope
47 | func toHexString() -> String? {
48 | // Convert the Color to UIColor
49 | let uiColor = UIColor(self)
| `- error: cannot find 'UIColor' in scope
50 |
51 | // Extract RGBA components from UIColor
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:77:21: error: 'currentIndex' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
75 |
76 | if hexString.hasPrefix("#") {
77 | scanner.currentIndex = hexString.index(after: hexString.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | }
79 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:92:14: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
:
90 | let blue = CGFloat(b) / 255
91 |
92 | self.init(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | }
94 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:103:32: error: cannot find 'UIColor' in scope
101 | func isDarkColor() -> Bool {
102 | // Extract RGB components from the color
103 | guard let components = UIColor(self).cgColor.components, components.count >= 3 else {
| `- error: cannot find 'UIColor' in scope
104 | return false
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:103:14: error: 'AsyncSequence' is only available in macOS 10.15 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
:
99 | /// }
100 | /// ```
101 | func stream<Value: Sendable>(
| `- note: add @available attribute to enclosing instance method
102 | of keyPath: KeyPath<Self, Value>
103 | ) -> any AsyncSequence<Value, Never> {
| `- error: 'AsyncSequence' is only available in macOS 10.15 or newer
104 | Observations {
105 | self[keyPath: keyPath]
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:76:18: error: 'Observable' is only available in macOS 14.0 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| | `- error: 'Observable' is only available in macOS 14.0 or newer
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:19: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:59:17: error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
59 | withObservationTracking {
| |- error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
60 | continuation.resume(returning: observationClosure())
61 | } onChange: {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:44: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:43: note: expanded code originates here
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift
|56 |
|57 |
|58 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+------------------------------------------------------------------------------------------------------------------
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
[43/44] Compiling Helper4Swift Observable+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:24: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:57: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:25:60: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | Binding(
27 | get: { self.wrappedValue },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:18:18: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:47:35: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
49 | set: { _ in self.wrappedValue = nil })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:62:91: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
64 | set: { self.wrappedValue = setter($0) })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:76:55: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:91:58: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
93 | set: { present in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:37:11: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:118:25: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
120 | set: { self.wrappedValue = !$0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:109:11: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:135:50: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
137 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:125:11: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:175:55: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
177 | set: { wrappedValue[contains: element] = $0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:165:11: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:11:5: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| `- note: add @available attribute to enclosing operator function
11 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
12 | get: { lhs.wrappedValue ?? rhs },
13 | set: { lhs.wrappedValue = $0 }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:26:9: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
26 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
27 | get: { self.wrappedValue },
28 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:48:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
49 | set: { _ in self.wrappedValue = nil })
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:63:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | set: { self.wrappedValue = setter($0) })
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:79:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
79 | return Binding(get: { self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
80 | set: { bounce.send($0) })
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:92:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | set: { present in
94 | if present {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:119:16: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | set: { self.wrappedValue = !$0 })
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:136:16: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
137 | set: { newValue in
138 | if newValue && !wrappedValue.contains(substring) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:176:16: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
177 | set: { wrappedValue[contains: element] = $0 })
178 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:13:23: error: cannot find type 'UIColor' in scope
11 | public extension Color {
12 |
13 | func uiColor() -> UIColor {
| `- error: cannot find type 'UIColor' in scope
14 |
15 | if #available(iOS 14.0, *) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:11:18: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | @available(iOS 13.0, *)
11 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | func uiColor() -> UIColor {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:41:18: error: 'Color' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:49:23: error: cannot find 'UIColor' in scope
47 | func toHexString() -> String? {
48 | // Convert the Color to UIColor
49 | let uiColor = UIColor(self)
| `- error: cannot find 'UIColor' in scope
50 |
51 | // Extract RGBA components from UIColor
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:77:21: error: 'currentIndex' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
75 |
76 | if hexString.hasPrefix("#") {
77 | scanner.currentIndex = hexString.index(after: hexString.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | }
79 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:92:14: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
:
90 | let blue = CGFloat(b) / 255
91 |
92 | self.init(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | }
94 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:103:32: error: cannot find 'UIColor' in scope
101 | func isDarkColor() -> Bool {
102 | // Extract RGB components from the color
103 | guard let components = UIColor(self).cgColor.components, components.count >= 3 else {
| `- error: cannot find 'UIColor' in scope
104 | return false
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:103:14: error: 'AsyncSequence' is only available in macOS 10.15 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
:
99 | /// }
100 | /// ```
101 | func stream<Value: Sendable>(
| `- note: add @available attribute to enclosing instance method
102 | of keyPath: KeyPath<Self, Value>
103 | ) -> any AsyncSequence<Value, Never> {
| `- error: 'AsyncSequence' is only available in macOS 10.15 or newer
104 | Observations {
105 | self[keyPath: keyPath]
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:76:18: error: 'Observable' is only available in macOS 14.0 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| | `- error: 'Observable' is only available in macOS 14.0 or newer
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:19: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:59:17: error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
59 | withObservationTracking {
| |- error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
60 | continuation.resume(returning: observationClosure())
61 | } onChange: {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:44: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:43: note: expanded code originates here
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift
|56 |
|57 |
|58 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+------------------------------------------------------------------------------------------------------------------
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
[44/44] Compiling Helper4Swift CALayer+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:24: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:10:57: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing operator function
11 | Binding(
12 | get: { lhs.wrappedValue ?? rhs },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:25:60: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | Binding(
27 | get: { self.wrappedValue },
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:18:18: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:47:35: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
49 | set: { _ in self.wrappedValue = nil })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:62:91: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
64 | set: { self.wrappedValue = setter($0) })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:76:55: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:91:58: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
93 | set: { present in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:37:11: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:118:25: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
120 | set: { self.wrappedValue = !$0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:109:11: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:135:50: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
137 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:125:11: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:175:55: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
177 | set: { wrappedValue[contains: element] = $0 })
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:165:11: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:11:5: error: 'Binding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
| `- note: add @available attribute to enclosing operator function
11 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
12 | get: { lhs.wrappedValue ?? rhs },
13 | set: { lhs.wrappedValue = $0 }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:26:9: error: 'Binding' is only available in macOS 10.15 or newer
16 |
17 | @available(iOS 13.0, *)
18 | public extension Binding {
| `- note: add @available attribute to enclosing extension
19 |
20 | /// Get notified when the value changed
:
23 | ///
24 | /// - Returns: same value
25 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
26 | Binding(
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
27 | get: { self.wrappedValue },
28 | set: { newValue in
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:48:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
45 | /// let isNotNullBinding = $optionalString.isNotNull()
46 | /// ```
47 | public func isNotNull<V>() -> Binding<Bool> where Value == Optional<V> {
| `- note: add @available attribute to enclosing instance method
48 | return Binding<Bool>(get: { self.wrappedValue != nil },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
49 | set: { _ in self.wrappedValue = nil })
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:63:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
60 | /// let stringBinding = $intValue.map(getter: { "\($0)" }, setter: { Int($0) ?? 0 })
61 | /// ```
62 | public func map<V>(getter: @escaping (Value) -> V, setter: @escaping (V) -> Value) -> Binding<V> {
| `- note: add @available attribute to enclosing instance method
63 | return Binding<V>(get: { getter(self.wrappedValue) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | set: { self.wrappedValue = setter($0) })
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:79:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
74 | /// let debouncedSearchText = $searchText.debounce(0.5) // 0.5 seconds delay
75 | /// ```
76 | public func debounce(_ interval: TimeInterval) -> Binding<Value> {
| `- note: add @available attribute to enclosing instance method
77 | let bounce = Debouncer(interval: interval, sender: { self.wrappedValue = $0 })
78 |
79 | return Binding(get: { self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
80 | set: { bounce.send($0) })
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:92:16: error: 'Binding' is only available in macOS 10.15 or newer
35 |
36 | @available(iOS 13.0, *)
37 | extension Binding {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// Creates a `Binding<Bool>` to determine if the original `Binding`'s value is not `nil`.
:
89 | /// let containsElementBinding = $optionalSet.contains(2) // true if 2 is in the set
90 | /// ```
91 | public func contains<Element>(_ element: Element) -> Binding<Bool> where Value == Optional<Set<Element>> {
| `- note: add @available attribute to enclosing instance method
92 | return Binding<Bool>(get: { return self.wrappedValue?.contains(element) ?? false },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | set: { present in
94 | if present {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:119:16: error: 'Binding' is only available in macOS 10.15 or newer
107 | }
108 |
109 | extension Binding where Value == Bool {
| `- note: add @available attribute to enclosing extension
110 |
111 | /// Provides a negated `Binding<Bool>` from the current `Binding<Bool>`.
:
116 | /// let isEnabledBinding = $isDisabled.negated // true if `isDisabled` is false
117 | /// ```
118 | public var negated: Binding<Bool> {
| `- note: add @available attribute to enclosing property
119 | return Binding(get: { !self.wrappedValue },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | set: { self.wrappedValue = !$0 })
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:136:16: error: 'Binding' is only available in macOS 10.15 or newer
123 | }
124 |
125 | extension Binding where Value == String {
| `- note: add @available attribute to enclosing extension
126 |
127 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s string contains a specific substring.
:
133 | /// let containsHello = $text.contains("Hello") // true if "Hello" is in the string
134 | /// ```
135 | public func contains(_ substring: String) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
136 | return Binding<Bool>(get: { wrappedValue.contains(substring) },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
137 | set: { newValue in
138 | if newValue && !wrappedValue.contains(substring) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Binding+Extension.swift:176:16: error: 'Binding' is only available in macOS 10.15 or newer
163 | }
164 |
165 | extension Binding where Value: SetAlgebra {
| `- note: add @available attribute to enclosing extension
166 |
167 | /// Creates a `Binding<Bool>` to determine if the current `Binding`'s set contains a specific element.
:
173 | /// let containsElementBinding = $mySet.contains(2) // true if 2 is in the set
174 | /// ```
175 | public func contains(_ element: Value.Element) -> Binding<Bool> {
| `- note: add @available attribute to enclosing instance method
176 | return Binding<Bool>(get: { wrappedValue[contains: element] },
| |- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
177 | set: { wrappedValue[contains: element] = $0 })
178 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:13:23: error: cannot find type 'UIColor' in scope
11 | public extension Color {
12 |
13 | func uiColor() -> UIColor {
| `- error: cannot find type 'UIColor' in scope
14 |
15 | if #available(iOS 14.0, *) {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:11:18: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | @available(iOS 13.0, *)
11 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | func uiColor() -> UIColor {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:41:18: error: 'Color' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:49:23: error: cannot find 'UIColor' in scope
47 | func toHexString() -> String? {
48 | // Convert the Color to UIColor
49 | let uiColor = UIColor(self)
| `- error: cannot find 'UIColor' in scope
50 |
51 | // Extract RGBA components from UIColor
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:77:21: error: 'currentIndex' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
75 |
76 | if hexString.hasPrefix("#") {
77 | scanner.currentIndex = hexString.index(after: hexString.startIndex)
| |- error: 'currentIndex' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | }
79 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:92:14: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
39 |
40 | @available(iOS 14.0, *)
41 | public extension Color {
| `- note: add @available attribute to enclosing extension
42 |
43 | /// Converts a SwiftUI Color to a hexadecimal string representation.
:
70 |
71 | // Initialize Color from Hex String
72 | init(hex: String) {
| `- note: add @available attribute to enclosing initializer
73 | let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
74 | let scanner = Scanner(string: hexString)
:
90 | let blue = CGFloat(b) / 255
91 |
92 | self.init(red: red, green: green, blue: blue)
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
93 | }
94 |
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Color+Extension.swift:103:32: error: cannot find 'UIColor' in scope
101 | func isDarkColor() -> Bool {
102 | // Extract RGB components from the color
103 | guard let components = UIColor(self).cgColor.components, components.count >= 3 else {
| `- error: cannot find 'UIColor' in scope
104 | return false
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:103:14: error: 'AsyncSequence' is only available in macOS 10.15 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
:
99 | /// }
100 | /// ```
101 | func stream<Value: Sendable>(
| `- note: add @available attribute to enclosing instance method
102 | of keyPath: KeyPath<Self, Value>
103 | ) -> any AsyncSequence<Value, Never> {
| `- error: 'AsyncSequence' is only available in macOS 10.15 or newer
104 | Observations {
105 | self[keyPath: keyPath]
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:76:18: error: 'Observable' is only available in macOS 14.0 or newer
74 |
75 | @available(iOS 18.0, *)
76 | public extension Observable {
| | `- error: 'Observable' is only available in macOS 14.0 or newer
| `- note: add @available attribute to enclosing extension
77 | /// Creates an async sequence that streams values of a specific property whenever it changes.
78 | ///
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:19: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:59:17: error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
59 | withObservationTracking {
| |- error: 'withObservationTracking(_:onChange:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
60 | continuation.resume(returning: observationClosure())
61 | } onChange: {
/Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:44: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift:58:43: note: expanded code originates here
46 |
47 | /// An async iterator that yields values when observed properties change.
48 | public struct AsyncIterator: AsyncIteratorProtocol {
| `- note: add @available attribute to enclosing struct
49 | private let observationClosure: @Sendable () -> Value
50 |
:
55 | /// Returns the next value when observed properties change.
56 | /// - Returns: The new value after a change, or nil if the sequence ends (which never happens in this implementation)
57 | public mutating func next() async -> Value? {
| `- note: add @available attribute to enclosing instance method
58 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/Helper4Swift/Extensions/SwiftUI/Observable+Extension.swift
|56 |
|57 |
|58 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+------------------------------------------------------------------------------------------------------------------
59 | withObservationTracking {
60 | continuation.resume(returning: observationClosure())
warning: 'spi-builder-workspace': /Users/admin/builder/spi-builder-workspace/Package.swift:10:45: warning: 'v10' is deprecated: tvOS 12.0 is the oldest supported version
8 | platforms: [
9 | .iOS(SupportedPlatform.IOSVersion.v13),
10 | .tvOS(SupportedPlatform.TVOSVersion.v10),
| `- warning: 'v10' is deprecated: tvOS 12.0 is the oldest supported version
11 | .watchOS(SupportedPlatform.WatchOSVersion.v3),
12 | .macOS(SupportedPlatform.MacOSVersion.v10_13)
/Users/admin/builder/spi-builder-workspace/Package.swift:11:51: warning: 'v3' is deprecated: watchOS 4.0 is the oldest supported version
9 | .iOS(SupportedPlatform.IOSVersion.v13),
10 | .tvOS(SupportedPlatform.TVOSVersion.v10),
11 | .watchOS(SupportedPlatform.WatchOSVersion.v3),
| `- warning: 'v3' is deprecated: watchOS 4.0 is the oldest supported version
12 | .macOS(SupportedPlatform.MacOSVersion.v10_13)
13 | ],
BUILD FAILURE 6.0 macosSpm