The Swift Package Index logo.Swift Package Index

Build Information

Failed to build PreviewResizable, reference 1.0.1 (0679c8), with Swift 6.2 for macOS (SPM) on 19 Jun 2025 23:07:19 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/yannxou/PreviewResizable.git
Reference: 1.0.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/yannxou/PreviewResizable
 * tag               1.0.1      -> FETCH_HEAD
HEAD is now at 0679c8a Added List view to example app
Cloned https://github.com/yannxou/PreviewResizable.git
Revision (git rev-parse @):
0679c8a3da21c8d2b08095620bb321a4674b9ff9
SUCCESS checkout https://github.com/yannxou/PreviewResizable.git at 1.0.1
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/yannxou/PreviewResizable.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-1EA4D86E10B52AF.txt
[3/5] Compiling PreviewResizable PreviewResizableViewModifier.swift
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:45: error: cannot find 'UIScreen' in scope
 10 | struct PreviewResizableViewModifier: ViewModifier {
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |                                             `- error: cannot find 'UIScreen' in scope
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:86: error: cannot find 'UIScreen' in scope
 10 | struct PreviewResizableViewModifier: ViewModifier {
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |                                                                                      `- error: cannot find 'UIScreen' in scope
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |      `- error: 'State' is only available in macOS 10.15 or newer
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:13:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
 13 |     @State private var isDragging = false
    |      `- error: 'State' is only available in macOS 10.15 or newer
 14 |     @State private var contentSize: CGSize = .zero
 15 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:14:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
    |      `- error: 'State' is only available in macOS 10.15 or newer
 15 |
 16 |     private let handleSize: CGFloat = 30
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:22:41: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 20 |     }
 21 |
 22 |     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
 23 |         GeometryReader { proxy in
 24 |             let maxSize = CGSize(width: proxy.size.width, height: proxy.size.height + proxy.safeAreaInsets.bottom)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:41:37: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 |                   `- error: 'View' is only available in macOS 10.15 or newer
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:47:54: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 45 |     }
 46 |
 47 |     private func dragHandle(maxSize: CGSize) -> some View {
    |                  |                                   `- error: 'View' is only available in macOS 10.15 or newer
    |                  `- note: add @available attribute to enclosing instance method
 48 |         ZStack(alignment: .bottomTrailing) {
 49 |             Image(systemName: "arrow.up.backward.and.arrow.down.forward")
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:73:35: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 71 |     }
 72 |
 73 |     private var sizeDisplay: some View {
    |                 |                 `- error: 'View' is only available in macOS 10.15 or newer
    |                 `- note: add @available attribute to enclosing property
 74 |         VStack(alignment: .trailing, spacing: 0) {
 75 |             Text("\(text(for: contentSize))")
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:89:61: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  |                                          `- error: 'View' is only available in macOS 10.15 or newer
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:116:43: error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
110 | fileprivate extension HorizontalAlignment {
    |             `- note: add @available attribute to enclosing extension
111 |     private enum CrossHorizontalAlignment : AlignmentID {
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
    :
114 |         }
115 |     }
116 |     static let crossHorizontalAlignment = HorizontalAlignment(CrossHorizontalAlignment.self)
    |                |                          `- error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:108:33: error: 'Alignment' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
    |                |                `- error: 'Alignment' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
109 | }
110 | fileprivate extension HorizontalAlignment {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:108:93: error: 'bottom' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
    |                |                                                                            `- error: 'bottom' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
109 | }
110 | fileprivate extension HorizontalAlignment {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:107:23: error: 'Alignment' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             |         `- error: 'Alignment' is only available in macOS 10.15 or newer
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:112:40: error: 'ViewDimensions' is only available in macOS 10.15 or newer
109 | }
110 | fileprivate extension HorizontalAlignment {
111 |     private enum CrossHorizontalAlignment : AlignmentID {
    |                  `- note: add @available attribute to enclosing enum
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
    |                     |                  `- error: 'ViewDimensions' is only available in macOS 10.15 or newer
    |                     `- note: add @available attribute to enclosing static method
113 |             return d[.trailing]
114 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:110:23: error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
110 | fileprivate extension HorizontalAlignment {
    |             |         `- error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
    |             `- note: add @available attribute to enclosing extension
111 |     private enum CrossHorizontalAlignment : AlignmentID {
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:128:37: error: 'View' is only available in macOS 10.15 or newer
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
    :
126 |     ///
127 |     /// Double-clicking the resize button adapts the container view size to the content size.
128 |     func previewResizable() -> some View {
    |          |                          `- error: 'View' is only available in macOS 10.15 or newer
    |          `- note: add @available attribute to enclosing instance method
129 |         modifier(PreviewResizableViewModifier())
130 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:121:18: error: 'View' is only available in macOS 10.15 or newer
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        |         `- error: 'View' is only available in macOS 10.15 or newer
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:42:9: error: 'Rectangle' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
    |         |- error: 'Rectangle' is only available in macOS 10.15 or newer
    |         `- note: add 'if #available' version check
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:43:14: error: 'strokeBorder(_:style:antialiased:)' is only available in macOS 14.0 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
    |              |- error: 'strokeBorder(_:style:antialiased:)' is only available in macOS 14.0 or newer
    |              `- note: add 'if #available' version check
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
 45 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:43:34: error: 'StrokeStyle' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
    |                                  |- error: 'StrokeStyle' is only available in macOS 10.15 or newer
    |                                  `- note: add 'if #available' version check
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
 45 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:44:14: error: 'foregroundColor' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
    |              |- error: 'foregroundColor' is only available in macOS 10.15 or newer
    |              `- note: add 'if #available' version check
 45 |     }
 46 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:44:50: error: 'gray' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
    |                                                  |- error: 'gray' is only available in macOS 10.15 or newer
    |                                                  `- note: add 'if #available' version check
 45 |     }
 46 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:44:58: error: 'red' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
 44 |             .foregroundColor(isContentFitting ? .gray : .red)
    |                                                          |- error: 'red' is only available in macOS 10.15 or newer
    |                                                          `- note: add 'if #available' version check
 45 |     }
 46 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:81:48: error: no exact matches in call to initializer
 79 |             Text("\(text(for: size))")
 80 |                 .foregroundColor(isContentFitting ? .primary : .white)
 81 |                 .background(isContentFitting ? Color(uiColor: .systemGroupedBackground) : .red)
    |                                                |- error: no exact matches in call to initializer
    |                                                |- note: candidate has partially matching parameter list (importing: URL, contentType: UTType?)
    |                                                `- note: candidate has partially matching parameter list (importing: Data, contentType: UTType?)
 82 |         }
 83 |         .font(.caption)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:81:64: error: cannot infer contextual base in reference to member 'systemGroupedBackground'
 79 |             Text("\(text(for: size))")
 80 |                 .foregroundColor(isContentFitting ? .primary : .white)
 81 |                 .background(isContentFitting ? Color(uiColor: .systemGroupedBackground) : .red)
    |                                                                `- error: cannot infer contextual base in reference to member 'systemGroupedBackground'
 82 |         }
 83 |         .font(.caption)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:90:9: error: 'VStack' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
    |         |- error: 'VStack' is only available in macOS 10.15 or newer
    |         `- note: add 'if #available' version check
 91 |             HStack(alignment: .center, spacing: 0) {
 92 |                 ChildSizeReader(size: $contentSize) {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:90:28: error: 'center' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
    |                            |- error: 'center' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 91 |             HStack(alignment: .center, spacing: 0) {
 92 |                 ChildSizeReader(size: $contentSize) {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:91:13: error: 'HStack' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
    |             |- error: 'HStack' is only available in macOS 10.15 or newer
    |             `- note: add 'if #available' version check
 92 |                 ChildSizeReader(size: $contentSize) {
 93 |                     content
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:91:32: error: 'center' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
    |                                |- error: 'center' is only available in macOS 10.15 or newer
    |                                `- note: add 'if #available' version check
 92 |                 ChildSizeReader(size: $contentSize) {
 93 |                     content
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:95:18: error: 'border(_:width:)' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
    :
 93 |                     content
 94 |                 }
 95 |                 .border(Color.accentColor, width: isDragging ? 1 : 0)
    |                  |- error: 'border(_:width:)' is only available in macOS 10.15 or newer
    |                  `- note: add 'if #available' version check
 96 |             }
 97 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:95:25: error: 'Color' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
    :
 93 |                     content
 94 |                 }
 95 |                 .border(Color.accentColor, width: isDragging ? 1 : 0)
    |                         |- error: 'Color' is only available in macOS 10.15 or newer
    |                         `- note: add 'if #available' version check
 96 |             }
 97 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:95:31: error: 'accentColor' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
    :
 93 |                     content
 94 |                 }
 95 |                 .border(Color.accentColor, width: isDragging ? 1 : 0)
    |                               |- error: 'accentColor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
 96 |             }
 97 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:113:23: error: 'trailing' is only available in macOS 10.15 or newer
109 | }
110 | fileprivate extension HorizontalAlignment {
111 |     private enum CrossHorizontalAlignment : AlignmentID {
    |                  `- note: add @available attribute to enclosing enum
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
    |                     `- note: add @available attribute to enclosing static method
113 |             return d[.trailing]
    |                       |- error: 'trailing' is only available in macOS 10.15 or newer
    |                       `- note: add 'if #available' version check
114 |         }
115 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:129: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
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
    :
126 |     ///
127 |     /// Double-clicking the resize button adapts the container view size to the content size.
128 |     func previewResizable() -> some View {
    |          `- note: add @available attribute to enclosing instance method
129 |         modifier(PreviewResizableViewModifier())
    |         |- 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
130 |     }
131 | }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:129:9: error: 'modifier' is only available in macOS 10.15 or newer
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
    :
126 |     ///
127 |     /// Double-clicking the resize button adapts the container view size to the content size.
128 |     func previewResizable() -> some View {
    |          `- note: add @available attribute to enclosing instance method
129 |         modifier(PreviewResizableViewModifier())
    |         |- error: 'modifier' is only available in macOS 10.15 or newer
    |         `- note: add 'if #available' version check
130 |     }
131 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/5] Emitting module PreviewResizable
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:4:6: error: 'Binding' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
   |      `- error: 'Binding' is only available in macOS 10.15 or newer
 5 |     let content: () -> Content
 6 |     var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:6:20: error: 'View' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         |          `- error: 'View' is only available in macOS 10.15 or newer
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:3:33: error: 'View' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        |                        `- error: 'View' is only available in macOS 10.15 or newer
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:45: error: cannot find 'UIScreen' in scope
 10 | struct PreviewResizableViewModifier: ViewModifier {
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |                                             `- error: cannot find 'UIScreen' in scope
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:86: error: cannot find 'UIScreen' in scope
 10 | struct PreviewResizableViewModifier: ViewModifier {
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |                                                                                      `- error: cannot find 'UIScreen' in scope
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:12:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    |      `- error: 'State' is only available in macOS 10.15 or newer
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:13:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
 13 |     @State private var isDragging = false
    |      `- error: 'State' is only available in macOS 10.15 or newer
 14 |     @State private var contentSize: CGSize = .zero
 15 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:14:6: error: 'State' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
 13 |     @State private var isDragging = false
 14 |     @State private var contentSize: CGSize = .zero
    |      `- error: 'State' is only available in macOS 10.15 or newer
 15 |
 16 |     private let handleSize: CGFloat = 30
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:22:41: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 20 |     }
 21 |
 22 |     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
 23 |         GeometryReader { proxy in
 24 |             let maxSize = CGSize(width: proxy.size.width, height: proxy.size.height + proxy.safeAreaInsets.bottom)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:41:37: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 39 |     }
 40 |
 41 |     private var rectangleHint: some View {
    |                 |                   `- error: 'View' is only available in macOS 10.15 or newer
    |                 `- note: add @available attribute to enclosing property
 42 |         Rectangle()
 43 |             .strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [5]))
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:47:54: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 45 |     }
 46 |
 47 |     private func dragHandle(maxSize: CGSize) -> some View {
    |                  |                                   `- error: 'View' is only available in macOS 10.15 or newer
    |                  `- note: add @available attribute to enclosing instance method
 48 |         ZStack(alignment: .bottomTrailing) {
 49 |             Image(systemName: "arrow.up.backward.and.arrow.down.forward")
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:73:35: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 71 |     }
 72 |
 73 |     private var sizeDisplay: some View {
    |                 |                 `- error: 'View' is only available in macOS 10.15 or newer
    |                 `- note: add @available attribute to enclosing property
 74 |         VStack(alignment: .trailing, spacing: 0) {
 75 |             Text("\(text(for: contentSize))")
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:89:61: error: 'View' is only available in macOS 10.15 or newer
  8 | import SwiftUI
  9 |
 10 | struct PreviewResizableViewModifier: ViewModifier {
    |        `- note: add @available attribute to enclosing struct
 11 |
 12 |     @State private var size = CGSize(width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width)
    :
 87 |     }
 88 |
 89 |     private func contentWrapper(_ content: Content) -> some View {
    |                  |                                          `- error: 'View' is only available in macOS 10.15 or newer
    |                  `- note: add @available attribute to enclosing instance method
 90 |         VStack(alignment: .center, spacing: 0) {
 91 |             HStack(alignment: .center, spacing: 0) {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:116:43: error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
110 | fileprivate extension HorizontalAlignment {
    |             `- note: add @available attribute to enclosing extension
111 |     private enum CrossHorizontalAlignment : AlignmentID {
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
    :
114 |         }
115 |     }
116 |     static let crossHorizontalAlignment = HorizontalAlignment(CrossHorizontalAlignment.self)
    |                |                          `- error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:108:33: error: 'Alignment' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
    |                |                `- error: 'Alignment' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
109 | }
110 | fileprivate extension HorizontalAlignment {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:108:93: error: 'bottom' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
    |                |                                                                            `- error: 'bottom' is only available in macOS 10.15 or newer
    |                `- note: add @available attribute to enclosing static property
109 | }
110 | fileprivate extension HorizontalAlignment {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:107:23: error: 'Alignment' is only available in macOS 10.15 or newer
105 | // MARK: - Alignment extensions
106 |
107 | fileprivate extension Alignment {
    |             |         `- error: 'Alignment' is only available in macOS 10.15 or newer
    |             `- note: add @available attribute to enclosing extension
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:112:40: error: 'ViewDimensions' is only available in macOS 10.15 or newer
109 | }
110 | fileprivate extension HorizontalAlignment {
111 |     private enum CrossHorizontalAlignment : AlignmentID {
    |                  `- note: add @available attribute to enclosing enum
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
    |                     |                  `- error: 'ViewDimensions' is only available in macOS 10.15 or newer
    |                     `- note: add @available attribute to enclosing static method
113 |             return d[.trailing]
114 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:110:23: error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
108 |     static let crossAlignment = Alignment(horizontal: .crossHorizontalAlignment, vertical: .bottom)
109 | }
110 | fileprivate extension HorizontalAlignment {
    |             |         `- error: 'HorizontalAlignment' is only available in macOS 10.15 or newer
    |             `- note: add @available attribute to enclosing extension
111 |     private enum CrossHorizontalAlignment : AlignmentID {
112 |         static func defaultValue(in d: ViewDimensions) -> CGFloat {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:128:37: error: 'View' is only available in macOS 10.15 or newer
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
    :
126 |     ///
127 |     /// Double-clicking the resize button adapts the container view size to the content size.
128 |     func previewResizable() -> some View {
    |          |                          `- error: 'View' is only available in macOS 10.15 or newer
    |          `- note: add @available attribute to enclosing instance method
129 |         modifier(PreviewResizableViewModifier())
130 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/PreviewResizableViewModifier.swift:121:18: error: 'View' is only available in macOS 10.15 or newer
119 | // MARK: - View extension
120 |
121 | public extension View {
    |        |         `- error: 'View' is only available in macOS 10.15 or newer
    |        `- note: add @available attribute to enclosing extension
122 |
123 |     /// Makes the container for the preview resizable.
[5/5] Compiling PreviewResizable ChildSizeReader.swift
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:4:6: error: 'Binding' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
   |      `- error: 'Binding' is only available in macOS 10.15 or newer
 5 |     let content: () -> Content
 6 |     var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:6:20: error: 'View' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         |          `- error: 'View' is only available in macOS 10.15 or newer
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:3:33: error: 'View' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        |                        `- error: 'View' is only available in macOS 10.15 or newer
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:7:9: error: 'ZStack' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
   |         |- error: 'ZStack' is only available in macOS 10.15 or newer
   |         `- note: add 'if #available' version check
 8 |             content()
 9 |                 .background(
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:9:18: error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
 9 |                 .background(
   |                  |- error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
   |                  `- note: add 'if #available' version check
10 |                     GeometryReader { proxy in
11 |                         Color.clear
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:10:21: error: 'GeometryReader' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
 9 |                 .background(
10 |                     GeometryReader { proxy in
   |                     |- error: 'GeometryReader' is only available in macOS 10.15 or newer
   |                     `- note: add 'if #available' version check
11 |                         Color.clear
12 |                             .preference(key: SizePreferenceKey.self, value: proxy.size)
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:11:25: error: 'Color' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
 9 |                 .background(
10 |                     GeometryReader { proxy in
11 |                         Color.clear
   |                         |- error: 'Color' is only available in macOS 10.15 or newer
   |                         `- note: add 'if #available' version check
12 |                             .preference(key: SizePreferenceKey.self, value: proxy.size)
13 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:11:31: error: 'clear' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
 9 |                 .background(
10 |                     GeometryReader { proxy in
11 |                         Color.clear
   |                               |- error: 'clear' is only available in macOS 10.15 or newer
   |                               `- note: add 'if #available' version check
12 |                             .preference(key: SizePreferenceKey.self, value: proxy.size)
13 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:12:30: error: 'preference(key:value:)' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
   :
10 |                     GeometryReader { proxy in
11 |                         Color.clear
12 |                             .preference(key: SizePreferenceKey.self, value: proxy.size)
   |                              |- error: 'preference(key:value:)' is only available in macOS 10.15 or newer
   |                              `- note: add 'if #available' version check
13 |                     }
14 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:16:10: error: 'onPreferenceChange(_:perform:)' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
   :
14 |                 )
15 |         }
16 |         .onPreferenceChange(SizePreferenceKey.self) { size in
   |          |- error: 'onPreferenceChange(_:perform:)' is only available in macOS 10.15 or newer
   |          `- note: add 'if #available' version check
17 |             self.size = size
18 |         }
/Users/admin/builder/spi-builder-workspace/Sources/PreviewResizable/ChildSizeReader.swift:17:13: error: setter for 'size' is only available in macOS 10.15 or newer
 1 | import SwiftUI
 2 |
 3 | struct ChildSizeReader<Content: View>: View {
   |        `- note: add @available attribute to enclosing generic struct
 4 |     @Binding var size: CGSize
 5 |     let content: () -> Content
 6 |     var body: some View {
   |         `- note: add @available attribute to enclosing property
 7 |         ZStack {
 8 |             content()
   :
15 |         }
16 |         .onPreferenceChange(SizePreferenceKey.self) { size in
17 |             self.size = size
   |             |- error: setter for 'size' is only available in macOS 10.15 or newer
   |             `- note: add 'if #available' version check
18 |         }
19 |     }
BUILD FAILURE 6.2 macosSpm