Build Information
Failed to build BetterSheet with Swift 6.0 for macOS (SPM).
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/egeniq/BetterSheet.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/egeniq/BetterSheet
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at c72f0ca Merge pull request #3 from egeniq/feature/fixed-example-project
Cloned https://github.com/egeniq/BetterSheet.git
Revision (git rev-parse @):
c72f0ca4aac2021b88e36ab756bc05611e86876f
SUCCESS checkout https://github.com/egeniq/BetterSheet.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/egeniq/BetterSheet.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/12] Compiling BetterSheet BetterSheetPreferenceKey.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPreferenceKey.swift:14:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
12 | typealias Value = BetterSheet?
13 |
14 | static var defaultValue: Value = nil
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | static func reduce(value: inout Value, nextValue: () -> Value) {
[4/12] Emitting module BetterSheet
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheet.swift:13:24: error: 'AnyView' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheet: Equatable {
| `- note: add @available attribute to enclosing struct
12 | let id = UUID()
13 | let content: () -> AnyView
| `- error: 'AnyView' is only available in macOS 10.15 or newer
14 | let onDismiss: (() -> Void)?
15 | let shouldDismiss: () -> Bool
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:11:50: error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
9 | import SwiftUI
10 |
11 | internal class BetterSheetCoordinator: NSObject, UIAdaptivePresentationControllerDelegate {
| `- error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
12 | private var sheet: BetterSheet?
13 | private weak var presentingCoordinator: BetterSheetCoordinator?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:17:39: error: cannot find type 'UIViewController' in scope
15 | internal var onDidAttemptToDismiss: [BetterSheetDidAttemptToDismissCallback] = []
16 |
17 | internal weak var viewController: UIViewController? {
| `- error: cannot find type 'UIViewController' in scope
18 | didSet {
19 | viewController?.presentationController?.delegate = self
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:74:78: error: cannot find type 'UIPresentationController' in scope
72 | }
73 |
74 | func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) {
| `- error: cannot find type 'UIPresentationController' in scope
75 | for callback in onDidAttemptToDismiss {
76 | callback.action()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:80:69: error: cannot find type 'UIPresentationController' in scope
78 | }
79 |
80 | func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
| `- error: cannot find type 'UIPresentationController' in scope
81 | viewController = nil
82 | dismiss()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:14:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
12 | typealias Value = Bool?
13 |
14 | static var defaultValue: Value = nil
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | static func reduce(value: inout Value, nextValue: () -> Value) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:22:66: error: 'View' is only available in macOS 10.15 or newer
19 | }
20 |
21 | public extension View {
| `- note: add @available attribute to enclosing extension
22 | func betterSheetIsModalInPresentation(_ value: Bool) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
23 | return preference(key: BetterSheetIsModalInPresentationPreferenceKey.self, value: value)
24 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:21:18: error: 'View' is only available in macOS 10.15 or newer
19 | }
20 |
21 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
22 | func betterSheetIsModalInPresentation(_ value: Bool) -> some View {
23 | return preference(key: BetterSheetIsModalInPresentationPreferenceKey.self, value: value)
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPreferenceKey.swift:14:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
12 | typealias Value = BetterSheet?
13 |
14 | static var defaultValue: Value = nil
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | static func reduce(value: inout Value, nextValue: () -> Value) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:30:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | private struct BetterSheetPresentationModeEnvironmentKey: EnvironmentKey {
30 | static var defaultValue: Binding<BetterSheetPresentationMode> = .constant(BetterSheetPresentationMode())
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
31 | }
32 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:30:30: error: 'Binding' is only available in macOS 10.15 or newer
27 | }
28 |
29 | private struct BetterSheetPresentationModeEnvironmentKey: EnvironmentKey {
| `- note: add @available attribute to enclosing struct
30 | static var defaultValue: Binding<BetterSheetPresentationMode> = .constant(BetterSheetPresentationMode())
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static property
31 | }
32 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:34:38: error: 'Binding' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension EnvironmentValues {
| `- note: add @available attribute to enclosing extension
34 | var betterSheetPresentationMode: Binding<BetterSheetPresentationMode> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 | get { self[BetterSheetPresentationModeEnvironmentKey.self] }
36 | set { self[BetterSheetPresentationModeEnvironmentKey.self] = newValue}
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:33:18: error: 'EnvironmentValues' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension EnvironmentValues {
| | `- error: 'EnvironmentValues' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
34 | var betterSheetPresentationMode: Binding<BetterSheetPresentationMode> {
35 | get { self[BetterSheetPresentationModeEnvironmentKey.self] }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:14:6: error: 'State' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
14 | @State private var presentationMode: BetterSheetPresentationMode
| `- error: 'State' is only available in macOS 10.15 or newer
15 |
16 | init(coordinator: BetterSheetCoordinator, @ViewBuilder content: @escaping () -> Content) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:16:48: error: 'ViewBuilder' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
14 | @State private var presentationMode: BetterSheetPresentationMode
15 |
16 | init(coordinator: BetterSheetCoordinator, @ViewBuilder content: @escaping () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
17 | self.coordinator = coordinator
18 | self.content = content
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:22:20: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
:
20 | }
21 |
22 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
23 | content()
24 | .environment(\.betterSheetPresentationMode, $presentationMode)
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:11:66: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:26:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
24 | typealias Value = [BetterSheetDidAttemptToDismissCallback]
25 |
26 | static var defaultValue: Value = []
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
27 |
28 | static func reduce(value: inout Value, nextValue: () -> Value) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:34:89: error: 'View' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension View {
| `- note: add @available attribute to enclosing extension
34 | func onBetterSheetDidAttemptToDismiss(perform action: @escaping () -> Void) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
35 | return preference(key: BetterSheetDidAttemptToDismissCallbacksPreferenceKey.self, value: [BetterSheetDidAttemptToDismissCallback(action)])
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:33:18: error: 'View' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
34 | func onBetterSheetDidAttemptToDismiss(perform action: @escaping () -> Void) -> some View {
35 | return preference(key: BetterSheetDidAttemptToDismissCallbacksPreferenceKey.self, value: [BetterSheetDidAttemptToDismissCallback(action)])
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/UIHostingController+BetterSheet.swift:11:18: error: cannot find type 'UIHostingController' in scope
9 | import SwiftUI
10 |
11 | public extension UIHostingController {
| `- error: cannot find type 'UIHostingController' in scope
12 | static func withBetterSheetSupport(rootView: Content) -> UIViewController {
13 | let coordinator = BetterSheetCoordinator()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:12:6: error: 'Binding' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
| `- error: 'Binding' is only available in macOS 10.15 or newer
13 | let onDismiss: (() -> Void)?
14 | let content: () -> Sheet
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:25:41: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
:
23 | }
24 |
25 | func body(content: Content) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | // We can't directly set a preference on content because if there are other sheet modifiers
27 | // at the same level in the view hierachy, the preferences would overwrite each-other.
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:11:73: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:40:6: error: 'Binding' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
| `- error: 'Binding' is only available in macOS 10.15 or newer
41 | let onDismiss: (() -> Void)?
42 | let content: (Item) -> Sheet
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:53:41: error: 'View' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
:
51 | }
52 |
53 | func body(content: Content) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
54 | // We can't directly set a preference on content because if there are other sheet modifiers
55 | // at the same level in the view hierachy, the preferences would overwrite each-other.
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:39:71: error: 'Identifiable' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| | `- error: 'Identifiable' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:39:92: error: 'View' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:166: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:44: error: 'Binding' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:92: error: 'ViewBuilder' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:146: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:167: error: 'Identifiable' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'Identifiable' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:190: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:43: error: 'Binding' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:92: error: 'ViewBuilder' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:150: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:67:18: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
[5/12] Compiling BetterSheet BetterSheetPresentationMode.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:30:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | private struct BetterSheetPresentationModeEnvironmentKey: EnvironmentKey {
30 | static var defaultValue: Binding<BetterSheetPresentationMode> = .constant(BetterSheetPresentationMode())
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
31 | }
32 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:30:30: error: 'Binding' is only available in macOS 10.15 or newer
27 | }
28 |
29 | private struct BetterSheetPresentationModeEnvironmentKey: EnvironmentKey {
| `- note: add @available attribute to enclosing struct
30 | static var defaultValue: Binding<BetterSheetPresentationMode> = .constant(BetterSheetPresentationMode())
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static property
31 | }
32 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:34:38: error: 'Binding' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension EnvironmentValues {
| `- note: add @available attribute to enclosing extension
34 | var betterSheetPresentationMode: Binding<BetterSheetPresentationMode> {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 | get { self[BetterSheetPresentationModeEnvironmentKey.self] }
36 | set { self[BetterSheetPresentationModeEnvironmentKey.self] = newValue}
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetPresentationMode.swift:33:18: error: 'EnvironmentValues' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension EnvironmentValues {
| | `- error: 'EnvironmentValues' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
34 | var betterSheetPresentationMode: Binding<BetterSheetPresentationMode> {
35 | get { self[BetterSheetPresentationModeEnvironmentKey.self] }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:17:39: error: cannot find type 'UIViewController' in scope
15 | internal var onDidAttemptToDismiss: [BetterSheetDidAttemptToDismissCallback] = []
16 |
17 | internal weak var viewController: UIViewController? {
| `- error: cannot find type 'UIViewController' in scope
18 | didSet {
19 | viewController?.presentationController?.delegate = self
[6/12] Compiling BetterSheet BetterSheetIsModalInPresentation.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:14:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
12 | typealias Value = Bool?
13 |
14 | static var defaultValue: Value = nil
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | static func reduce(value: inout Value, nextValue: () -> Value) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:22:66: error: 'View' is only available in macOS 10.15 or newer
19 | }
20 |
21 | public extension View {
| `- note: add @available attribute to enclosing extension
22 | func betterSheetIsModalInPresentation(_ value: Bool) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
23 | return preference(key: BetterSheetIsModalInPresentationPreferenceKey.self, value: value)
24 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:21:18: error: 'View' is only available in macOS 10.15 or newer
19 | }
20 |
21 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
22 | func betterSheetIsModalInPresentation(_ value: Bool) -> some View {
23 | return preference(key: BetterSheetIsModalInPresentationPreferenceKey.self, value: value)
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetIsModalInPresentation.swift:23:16: error: 'preference(key:value:)' is only available in macOS 10.15 or newer
19 | }
20 |
21 | public extension View {
| `- note: add @available attribute to enclosing extension
22 | func betterSheetIsModalInPresentation(_ value: Bool) -> some View {
| `- note: add @available attribute to enclosing instance method
23 | return preference(key: BetterSheetIsModalInPresentationPreferenceKey.self, value: value)
| |- error: 'preference(key:value:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
24 | }
25 | }
[7/12] Compiling BetterSheet View+BetterSheet.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:12:6: error: 'Binding' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
| `- error: 'Binding' is only available in macOS 10.15 or newer
13 | let onDismiss: (() -> Void)?
14 | let content: () -> Sheet
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:25:41: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
:
23 | }
24 |
25 | func body(content: Content) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
26 | // We can't directly set a preference on content because if there are other sheet modifiers
27 | // at the same level in the view hierachy, the preferences would overwrite each-other.
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:11:73: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:40:6: error: 'Binding' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
| `- error: 'Binding' is only available in macOS 10.15 or newer
41 | let onDismiss: (() -> Void)?
42 | let content: (Item) -> Sheet
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:53:41: error: 'View' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
:
51 | }
52 |
53 | func body(content: Content) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
54 | // We can't directly set a preference on content because if there are other sheet modifiers
55 | // at the same level in the view hierachy, the preferences would overwrite each-other.
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:39:71: error: 'Identifiable' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| | `- error: 'Identifiable' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:39:92: error: 'View' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:166: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:44: error: 'Binding' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:92: error: 'ViewBuilder' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:68:146: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:167: error: 'Identifiable' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'Identifiable' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:190: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:43: error: 'Binding' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'Binding' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:92: error: 'ViewBuilder' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:72:150: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:67:18: error: 'View' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:18:24: error: 'AnyView' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
14 | let content: () -> Sheet
15 |
16 | func sheet() -> BetterSheet {
| `- note: add @available attribute to enclosing instance method
17 | BetterSheet(
18 | content: { AnyView(self.content()) },
| |- error: 'AnyView' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
19 | onDismiss: onDismiss,
20 | shouldDismiss: { !self.isPresented },
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:21:29: error: setter for 'isPresented' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
14 | let content: () -> Sheet
15 |
16 | func sheet() -> BetterSheet {
| `- note: add @available attribute to enclosing instance method
17 | BetterSheet(
18 | content: { AnyView(self.content()) },
19 | onDismiss: onDismiss,
20 | shouldDismiss: { !self.isPresented },
21 | resetBinding: { self.isPresented = false }
| |- error: setter for 'isPresented' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
22 | )
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:29:17: error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
:
23 | }
24 |
25 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
26 | // We can't directly set a preference on content because if there are other sheet modifiers
27 | // at the same level in the view hierachy, the preferences would overwrite each-other.
28 | // We use an empty background view as workaround.
29 | content.background(
| |- error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
30 | EmptyView()
31 | .preference(
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:30:13: error: 'EmptyView' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
:
23 | }
24 |
25 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
26 | // We can't directly set a preference on content because if there are other sheet modifiers
27 | // at the same level in the view hierachy, the preferences would overwrite each-other.
28 | // We use an empty background view as workaround.
29 | content.background(
30 | EmptyView()
| |- error: 'EmptyView' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
31 | .preference(
32 | key: BetterSheetPreferenceKey.self,
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:31:18: error: 'preference(key:value:)' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | private struct BetterSheetIsPresented<Sheet>: ViewModifier where Sheet: View {
| `- note: add @available attribute to enclosing generic struct
12 | @Binding var isPresented: Bool
13 | let onDismiss: (() -> Void)?
:
23 | }
24 |
25 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
26 | // We can't directly set a preference on content because if there are other sheet modifiers
27 | // at the same level in the view hierachy, the preferences would overwrite each-other.
:
29 | content.background(
30 | EmptyView()
31 | .preference(
| |- error: 'preference(key:value:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
32 | key: BetterSheetPreferenceKey.self,
33 | value: isPresented ? sheet() : nil
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:46:24: error: 'AnyView' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
42 | let content: (Item) -> Sheet
43 |
44 | func sheet(for item: Item) -> BetterSheet {
| `- note: add @available attribute to enclosing instance method
45 | BetterSheet(
46 | content: { AnyView(self.content(item)) },
| |- error: 'AnyView' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
47 | onDismiss: onDismiss,
48 | shouldDismiss: { self.item?.id != item.id },
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:49:29: error: setter for 'item' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
42 | let content: (Item) -> Sheet
43 |
44 | func sheet(for item: Item) -> BetterSheet {
| `- note: add @available attribute to enclosing instance method
45 | BetterSheet(
46 | content: { AnyView(self.content(item)) },
47 | onDismiss: onDismiss,
48 | shouldDismiss: { self.item?.id != item.id },
49 | resetBinding: { self.item = nil }
| |- error: setter for 'item' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
50 | )
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:57:17: error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
:
51 | }
52 |
53 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
54 | // We can't directly set a preference on content because if there are other sheet modifiers
55 | // at the same level in the view hierachy, the preferences would overwrite each-other.
56 | // We use an empty background view as workaround.
57 | content.background(
| |- error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
58 | EmptyView()
59 | .preference(
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:58:13: error: 'EmptyView' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
:
51 | }
52 |
53 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
54 | // We can't directly set a preference on content because if there are other sheet modifiers
55 | // at the same level in the view hierachy, the preferences would overwrite each-other.
56 | // We use an empty background view as workaround.
57 | content.background(
58 | EmptyView()
| |- error: 'EmptyView' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | .preference(
60 | key: BetterSheetPreferenceKey.self,
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:59:18: error: 'preference(key:value:)' is only available in macOS 10.15 or newer
37 | }
38 |
39 | private struct BetterSheetItem<Item, Sheet>: ViewModifier where Item: Identifiable, Sheet: View {
| `- note: add @available attribute to enclosing generic struct
40 | @Binding var item: Item?
41 | let onDismiss: (() -> Void)?
:
51 | }
52 |
53 | func body(content: Content) -> some View {
| `- note: add @available attribute to enclosing instance method
54 | // We can't directly set a preference on content because if there are other sheet modifiers
55 | // at the same level in the view hierachy, the preferences would overwrite each-other.
:
57 | content.background(
58 | EmptyView()
59 | .preference(
| |- error: 'preference(key:value:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
60 | key: BetterSheetPreferenceKey.self,
61 | value: self.item != nil ? self.sheet(for: self.item!) : nil
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:69:9: warning: conformance of 'ModifiedContent<Content, Modifier>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
| |- warning: conformance of 'ModifiedContent<Content, Modifier>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:69:9: error: 'modifier' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
| `- note: add @available attribute to enclosing instance method
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
| |- error: 'modifier' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:73:9: warning: conformance of 'ModifiedContent<Content, Modifier>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
| |- warning: conformance of 'ModifiedContent<Content, Modifier>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
74 | }
75 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/View+BetterSheet.swift:73:9: error: 'modifier' is only available in macOS 10.15 or newer
65 | }
66 |
67 | public extension View {
| `- note: add @available attribute to enclosing extension
68 | func betterSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
69 | modifier(BetterSheetIsPresented(isPresented: isPresented, onDismiss: onDismiss, content: content))
70 | }
71 |
72 | func betterSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item: Identifiable, Content: View {
| `- note: add @available attribute to enclosing instance method
73 | modifier(BetterSheetItem(item: item, onDismiss: onDismiss, content: content))
| |- error: 'modifier' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | }
75 | }
[8/12] Compiling BetterSheet BetterSheet.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheet.swift:13:24: error: 'AnyView' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheet: Equatable {
| `- note: add @available attribute to enclosing struct
12 | let id = UUID()
13 | let content: () -> AnyView
| `- error: 'AnyView' is only available in macOS 10.15 or newer
14 | let onDismiss: (() -> Void)?
15 | let shouldDismiss: () -> Bool
[9/12] Compiling BetterSheet BetterSheetSupport.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:14:6: error: 'State' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
14 | @State private var presentationMode: BetterSheetPresentationMode
| `- error: 'State' is only available in macOS 10.15 or newer
15 |
16 | init(coordinator: BetterSheetCoordinator, @ViewBuilder content: @escaping () -> Content) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:16:48: error: 'ViewBuilder' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
14 | @State private var presentationMode: BetterSheetPresentationMode
15 |
16 | init(coordinator: BetterSheetCoordinator, @ViewBuilder content: @escaping () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
17 | self.coordinator = coordinator
18 | self.content = content
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:22:20: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
:
20 | }
21 |
22 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
23 | content()
24 | .environment(\.betterSheetPresentationMode, $presentationMode)
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:11:66: error: 'View' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:11:50: error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
9 | import SwiftUI
10 |
11 | internal class BetterSheetCoordinator: NSObject, UIAdaptivePresentationControllerDelegate {
| `- error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
12 | private var sheet: BetterSheet?
13 | private weak var presentingCoordinator: BetterSheetCoordinator?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetSupport.swift:19:29: error: 'State' is only available in macOS 10.15 or newer
9 | import SwiftUI
10 |
11 | internal struct BetterSheetSupport<Content>: View where Content: View {
| `- note: add @available attribute to enclosing generic struct
12 | private let coordinator: BetterSheetCoordinator
13 | private let content: () -> Content
14 | @State private var presentationMode: BetterSheetPresentationMode
15 |
16 | init(coordinator: BetterSheetCoordinator, @ViewBuilder content: @escaping () -> Content) {
| `- note: add @available attribute to enclosing initializer
17 | self.coordinator = coordinator
18 | self.content = content
19 | _presentationMode = State(initialValue: BetterSheetPresentationMode(coordinator: coordinator))
| |- error: 'State' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
20 | }
21 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:17:39: error: cannot find type 'UIViewController' in scope
15 | internal var onDidAttemptToDismiss: [BetterSheetDidAttemptToDismissCallback] = []
16 |
17 | internal weak var viewController: UIViewController? {
| `- error: cannot find type 'UIViewController' in scope
18 | didSet {
19 | viewController?.presentationController?.delegate = self
[10/12] Compiling BetterSheet OnBetterSheetDidAttemptToDismiss.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:26:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
24 | typealias Value = [BetterSheetDidAttemptToDismissCallback]
25 |
26 | static var defaultValue: Value = []
| |- warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
27 |
28 | static func reduce(value: inout Value, nextValue: () -> Value) {
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:34:89: error: 'View' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension View {
| `- note: add @available attribute to enclosing extension
34 | func onBetterSheetDidAttemptToDismiss(perform action: @escaping () -> Void) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
35 | return preference(key: BetterSheetDidAttemptToDismissCallbacksPreferenceKey.self, value: [BetterSheetDidAttemptToDismissCallback(action)])
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:33:18: error: 'View' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
34 | func onBetterSheetDidAttemptToDismiss(perform action: @escaping () -> Void) -> some View {
35 | return preference(key: BetterSheetDidAttemptToDismissCallbacksPreferenceKey.self, value: [BetterSheetDidAttemptToDismissCallback(action)])
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/OnBetterSheetDidAttemptToDismiss.swift:35:16: error: 'preference(key:value:)' is only available in macOS 10.15 or newer
31 | }
32 |
33 | public extension View {
| `- note: add @available attribute to enclosing extension
34 | func onBetterSheetDidAttemptToDismiss(perform action: @escaping () -> Void) -> some View {
| `- note: add @available attribute to enclosing instance method
35 | return preference(key: BetterSheetDidAttemptToDismissCallbacksPreferenceKey.self, value: [BetterSheetDidAttemptToDismissCallback(action)])
| |- error: 'preference(key:value:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
36 | }
37 | }
[11/12] Compiling BetterSheet BetterSheetCoordinator.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:11:50: error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
9 | import SwiftUI
10 |
11 | internal class BetterSheetCoordinator: NSObject, UIAdaptivePresentationControllerDelegate {
| `- error: cannot find type 'UIAdaptivePresentationControllerDelegate' in scope
12 | private var sheet: BetterSheet?
13 | private weak var presentingCoordinator: BetterSheetCoordinator?
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:17:39: error: cannot find type 'UIViewController' in scope
15 | internal var onDidAttemptToDismiss: [BetterSheetDidAttemptToDismissCallback] = []
16 |
17 | internal weak var viewController: UIViewController? {
| `- error: cannot find type 'UIViewController' in scope
18 | didSet {
19 | viewController?.presentationController?.delegate = self
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:74:78: error: cannot find type 'UIPresentationController' in scope
72 | }
73 |
74 | func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) {
| `- error: cannot find type 'UIPresentationController' in scope
75 | for callback in onDidAttemptToDismiss {
76 | callback.action()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:80:69: error: cannot find type 'UIPresentationController' in scope
78 | }
79 |
80 | func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
| `- error: cannot find type 'UIPresentationController' in scope
81 | viewController = nil
82 | dismiss()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:46:30: error: cannot find 'UIHostingController' in scope
44 | }
45 |
46 | let viewController = UIHostingController(rootView: rootView)
| `- error: cannot find 'UIHostingController' in scope
47 | coordinator.viewController = viewController
48 | presentedCoordinator = coordinator
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:56:51: error: 'nil' requires a contextual type
54 |
55 | if let viewController = presentedCoordinator.viewController {
56 | presentedCoordinator.viewController = nil
| `- error: 'nil' requires a contextual type
57 | viewController.dismiss(animated: true)
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/BetterSheetCoordinator.swift:81:26: error: 'nil' requires a contextual type
79 |
80 | func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
81 | viewController = nil
| `- error: 'nil' requires a contextual type
82 | dismiss()
83 | }
[12/12] Compiling BetterSheet UIHostingController+BetterSheet.swift
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/UIHostingController+BetterSheet.swift:11:18: error: cannot find type 'UIHostingController' in scope
9 | import SwiftUI
10 |
11 | public extension UIHostingController {
| `- error: cannot find type 'UIHostingController' in scope
12 | static func withBetterSheetSupport(rootView: Content) -> UIViewController {
13 | let coordinator = BetterSheetCoordinator()
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/UIHostingController+BetterSheet.swift:12:62: error: cannot find type 'UIViewController' in scope
10 |
11 | public extension UIHostingController {
12 | static func withBetterSheetSupport(rootView: Content) -> UIViewController {
| `- error: cannot find type 'UIViewController' in scope
13 | let coordinator = BetterSheetCoordinator()
14 |
/Users/admin/builder/spi-builder-workspace/Sources/BetterSheet/UIHostingController+BetterSheet.swift:12:50: error: cannot find type 'Content' in scope
10 |
11 | public extension UIHostingController {
12 | static func withBetterSheetSupport(rootView: Content) -> UIViewController {
| `- error: cannot find type 'Content' in scope
13 | let coordinator = BetterSheetCoordinator()
14 |
BUILD FAILURE 6.0 macosSpm