Build Information
Failed to build ScanBarcodes, reference 1.0.6 (c023ef), with Swift 6.3 for macOS (SPM) on 13 Apr 2026 16:26:01 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nasa-jpl/ScanBarcodes.git
Reference: 1.0.6
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/nasa-jpl/ScanBarcodes
* tag 1.0.6 -> FETCH_HEAD
HEAD is now at c023ef1 add torch mode supported check to avoid crashing on devices without a flash (torch)
Cloned https://github.com/nasa-jpl/ScanBarcodes.git
Revision (git rev-parse @):
c023ef18b559d2479e36d4e192e7df03db76b203
SUCCESS checkout https://github.com/nasa-jpl/ScanBarcodes.git at 1.0.6
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"traits": [
"default"
],
"dependencies": [
{
"identity": "scanbarcodes",
"name": "ScanBarcodes",
"url": "https://github.com/nasa-jpl/ScanBarcodes.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/ScanBarcodes",
"traits": [
"default"
],
"dependencies": [
]
}
]
}
Fetching https://github.com/nasa-jpl/ScanBarcodes.git
[1/100] Fetching scanbarcodes
Fetched https://github.com/nasa-jpl/ScanBarcodes.git from cache (0.67s)
Creating working copy for https://github.com/nasa-jpl/ScanBarcodes.git
Working copy of https://github.com/nasa-jpl/ScanBarcodes.git resolved at 1.0.6 (c023ef1)
warning: '.resolve-product-dependencies': dependency 'scanbarcodes' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.3
Building package at path: $PWD
https://github.com/nasa-jpl/ScanBarcodes.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--6988338F2F200930.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Compiling ScanBarcodes ScanBarcodesView.swift
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:9:6: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
| `- error: 'Binding' is only available in macOS 10.15 or newer
10 | @Binding var flashlightOn: Bool
11 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:10:6: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
| `- error: 'Binding' is only available in macOS 10.15 or newer
11 |
12 | public let barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType]
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:12:31: error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
11 |
12 | public let barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType]
| `- error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
13 | public var completion: (Result<String, BarcodeScanError>) -> Void
14 | public var scanRateDelay: Double
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:17:24: error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
| `- error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
18 | zoomLevel : Binding<Int> = .constant(1),
19 | flashlightOn: Binding<Bool> = .constant(false),
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:18:21: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
18 | zoomLevel : Binding<Int> = .constant(1),
| `- error: 'Binding' is only available in macOS 10.15 or newer
19 | flashlightOn: Binding<Bool> = .constant(false),
20 | scanRateDelay: Double = 5,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:19:23: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
18 | zoomLevel : Binding<Int> = .constant(1),
19 | flashlightOn: Binding<Bool> = .constant(false),
| `- error: 'Binding' is only available in macOS 10.15 or newer
20 | scanRateDelay: Double = 5,
21 | completion: @escaping (Result<String, BarcodeScanError>) -> Void) {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:33:47: error: cannot find type 'Context' in scope
31 | }
32 |
33 | public func makeUIViewController(context: Context) -> ScanBarcodesViewController {
| `- error: cannot find type 'Context' in scope
34 | let viewC = ScanBarcodesViewController(flashlightOn, zoomLevel)
35 | viewC.delegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:39:97: error: cannot find type 'Context' in scope
37 | }
38 |
39 | public func updateUIViewController(_ uiViewController: ScanBarcodesViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
40 | // update flashlight and zoom level
41 | guard let _ = AVCaptureDevice.default(for: .video) else {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:63:23: error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
51 |
52 |
53 | public class ScanBarcodesCoordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
| `- note: add '@available' attribute to enclosing class
54 | var parent: ScanBarcodesView
55 | private var lastBarcodeScanned: String = ""
:
60 | }
61 |
62 | public func metadataOutput(
| `- note: add '@available' attribute to enclosing instance method
63 | _ output: AVCaptureMetadataOutput,
| `- error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
64 | didOutput metadataObjects: [AVMetadataObject],
65 | from connection: AVCaptureConnection) {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:90:46: error: cannot find type 'UIViewController' in scope
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- error: cannot find type 'UIViewController' in scope
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:93:27: error: 'AVCapturePhotoOutput' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
93 | let photoOutput = AVCapturePhotoOutput()
| `- error: 'AVCapturePhotoOutput' is only available in macOS 10.15 or newer
94 | let serialQueue = DispatchQueue(label: "AVCaptureSession")
95 | let barcodeQueue = DispatchQueue(label: "BarcodeDetection")
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:112:30: error: method does not override any method from its superclass
110 | }
111 |
112 | public override func viewDidLoad() {
| `- error: method does not override any method from its superclass
113 | super.viewDidLoad()
114 | NotificationCenter.default.addObserver(
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:122:30: error: method does not override any method from its superclass
120 | }
121 |
122 | override public func viewWillAppear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
123 | super.viewWillAppear(animated)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:134:30: error: method does not override any method from its superclass
132 | }
133 |
134 | override public func viewWillDisappear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
135 | stopSessionAndRemoveCameraInputOutput()
136 | NotificationCenter.default.removeObserver(self)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:140:30: error: method does not override any method from its superclass
138 | }
139 |
140 | public override func viewDidAppear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
141 | super.viewDidAppear(animated)
142 | updateOrientation()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:145:30: error: method does not override any method from its superclass
143 | }
144 |
145 | override public func viewWillLayoutSubviews() {
| `- error: method does not override any method from its superclass
146 | previewLayer?.frame = view.layer.bounds
147 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:149:84: error: cannot find type 'UIViewControllerTransitionCoordinator' in scope
147 | }
148 |
149 | public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
| `- error: cannot find type 'UIViewControllerTransitionCoordinator' in scope
150 | coordinator.animate(alongsideTransition: { (UIViewControllerTransitionCoordinatorContext) -> Void in
151 | self.previewLayer.connection?.videoOrientation = self.videoOrientationFromCurrentDeviceOrientation()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:160:61: error: cannot find type 'UIInterfaceOrientationMask' in scope
158 | }
159 |
160 | public override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
| `- error: cannot find type 'UIInterfaceOrientationMask' in scope
161 | return .all
162 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:170:58: error: cannot find type 'UITouch' in scope
168 | }
169 |
170 | public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
| `- error: cannot find type 'UITouch' in scope
171 | guard touches.first?.view == view,
172 | let touchPoint = touches.first,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:170:80: error: cannot find type 'UIEvent' in scope
168 | }
169 |
170 | public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
| `- error: cannot find type 'UIEvent' in scope
171 | guard touches.first?.view == view,
172 | let touchPoint = touches.first,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:8:33: error: cannot find type 'UIViewControllerRepresentable' in scope
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:300:31: error: 'View' is only available in macOS 10.15 or newer
297 | }
298 |
299 | struct ScanBarcodesView_Previews: PreviewProvider {
| `- note: add '@available' attribute to enclosing struct
300 | static var previews: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing static property
301 | ScanBarcodesView(barcodeTypes: [.qr]) { result in
302 | //nothing to do
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:67:67: error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
51 |
52 |
53 | public class ScanBarcodesCoordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
| `- note: add '@available' attribute to enclosing class
54 | var parent: ScanBarcodesView
55 | private var lastBarcodeScanned: String = ""
:
60 | }
61 |
62 | public func metadataOutput(
| `- note: add '@available' attribute to enclosing instance method
63 | _ output: AVCaptureMetadataOutput,
64 | didOutput metadataObjects: [AVMetadataObject],
65 | from connection: AVCaptureConnection) {
66 | if let metadataObject = metadataObjects.first {
67 | guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return }
| |- error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
68 | guard let barcodeValue = readableObject.stringValue else { return }
69 | recognized(barcodeValue)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:103:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
101 | self.flashlightOn = false
102 | self.zoomLevel = 1
103 | super.init(coder: coder)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
104 | }
105 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:109:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
107 | self.flashlightOn = flashlightOn
108 | self.zoomLevel = zoomLevel
109 | super.init(nibName: nil, bundle: nil)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:109:33: error: 'nil' requires a contextual type
107 | self.flashlightOn = flashlightOn
108 | self.zoomLevel = zoomLevel
109 | super.init(nibName: nil, bundle: nil)
| `- error: 'nil' requires a contextual type
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:109:46: error: 'nil' requires a contextual type
107 | self.flashlightOn = flashlightOn
108 | self.zoomLevel = zoomLevel
109 | super.init(nibName: nil, bundle: nil)
| `- error: 'nil' requires a contextual type
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:113:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
111 |
112 | public override func viewDidLoad() {
113 | super.viewDidLoad()
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
114 | NotificationCenter.default.addObserver(
115 | self,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:123:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
121 |
122 | override public func viewWillAppear(_ animated: Bool) {
123 | super.viewWillAppear(animated)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
124 |
125 | if previewLayer == nil {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:128:34: error: cannot find 'view' in scope
126 | previewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
127 | }
128 | previewLayer.frame = view.layer.bounds
| `- error: cannot find 'view' in scope
129 | previewLayer.videoGravity = .resizeAspectFill
130 | view.layer.addSublayer(previewLayer)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:130:13: error: cannot find 'view' in scope
128 | previewLayer.frame = view.layer.bounds
129 | previewLayer.videoGravity = .resizeAspectFill
130 | view.layer.addSublayer(previewLayer)
| `- error: cannot find 'view' in scope
131 | startCameraSession()
132 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:137:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
135 | stopSessionAndRemoveCameraInputOutput()
136 | NotificationCenter.default.removeObserver(self)
137 | super.viewWillDisappear(animated)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
138 | }
139 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:141:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
139 |
140 | public override func viewDidAppear(_ animated: Bool) {
141 | super.viewDidAppear(animated)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
142 | updateOrientation()
143 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:146:35: error: cannot find 'view' in scope
144 |
145 | override public func viewWillLayoutSubviews() {
146 | previewLayer?.frame = view.layer.bounds
| `- error: cannot find 'view' in scope
147 | }
148 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:157:13: error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
155 | })
156 |
157 | super.viewWillTransition(to: size, with: coordinator)
| `- error: 'super' cannot be used in class 'ScanBarcodesViewController' because it has no superclass
158 | }
159 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:165:37: error: cannot find 'UIApplication' in scope
163 |
164 | @objc func updateOrientation() {
165 | guard let orientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation else { return }
| `- error: cannot find 'UIApplication' in scope
166 | guard let connection = captureSession.connections.last, connection.isVideoOrientationSupported else { return }
167 | connection.videoOrientation = AVCaptureVideoOrientation(rawValue: orientation.rawValue) ?? .portrait
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:166:51: error: 'connections' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
162 | }
163 |
164 | @objc func updateOrientation() {
| `- note: add '@available' attribute to enclosing instance method
165 | guard let orientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation else { return }
166 | guard let connection = captureSession.connections.last, connection.isVideoOrientationSupported else { return }
| |- error: 'connections' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
167 | connection.videoOrientation = AVCaptureVideoOrientation(rawValue: orientation.rawValue) ?? .portrait
168 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:171:42: error: cannot find 'view' in scope
169 |
170 | public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
171 | guard touches.first?.view == view,
| `- error: cannot find 'view' in scope
172 | let touchPoint = touches.first,
173 | let device = AVCaptureDevice.default(for: .video)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:176:29: error: cannot find 'view' in scope
174 | else { return }
175 |
176 | let videoView = view
| `- error: cannot find 'view' in scope
177 | let screenSize = videoView!.bounds.size
178 | let xPoint = touchPoint.location(in: videoView).y / screenSize.height
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:194:20: error: 'videoZoomFactor' is unavailable in macOS
192 | device.exposureMode = AVCaptureDevice.ExposureMode.continuousAutoExposure
193 | safelySetTorch(device, mode: flashlightOn ? AVCaptureDevice.TorchMode.on : AVCaptureDevice.TorchMode.off)
194 | device.videoZoomFactor = CGFloat(zoomLevel)
| `- error: 'videoZoomFactor' is unavailable in macOS
195 | device.unlockForConfiguration()
196 | }
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:1929:30: note: 'videoZoomFactor' has been explicitly marked unavailable here
1927 | @seealso -[AVCaptureDeviceFormat videoMaxZoomFactor], -[AVCaptureDeviceFormat videoZoomFactorUpscaleThreshold], -[AVCaptureDevice minAvailableVideoZoomFactor], -[AVCaptureDevice maxAvailableVideoZoomFactor], -[AVCaptureDeviceFormat supportedVideoZoomFactorsForDepthDataDelivery], -[AVCaptureDeviceFormat videoMinZoomFactorForCenterStage] and -[AVCaptureDeviceFormat videoMaxZoomFactorForCenterStage]
1928 | */
1929 | @property(nonatomic) CGFloat videoZoomFactor API_AVAILABLE(ios(7.0), macCatalyst(14.0), tvos(17.0)) API_UNAVAILABLE(macos, visionos);
| `- note: 'videoZoomFactor' has been explicitly marked unavailable here
1930 |
1931 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:207:24: error: 'videoZoomFactor' is unavailable in macOS
205 | try device.lockForConfiguration()
206 | safelySetTorch(device, mode: flashlightOn ? .on : .off)
207 | device.videoZoomFactor = CGFloat(zoomLevel)
| `- error: 'videoZoomFactor' is unavailable in macOS
208 | device.unlockForConfiguration()
209 | } catch let error {
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:1929:30: note: 'videoZoomFactor' has been explicitly marked unavailable here
1927 | @seealso -[AVCaptureDeviceFormat videoMaxZoomFactor], -[AVCaptureDeviceFormat videoZoomFactorUpscaleThreshold], -[AVCaptureDevice minAvailableVideoZoomFactor], -[AVCaptureDevice maxAvailableVideoZoomFactor], -[AVCaptureDeviceFormat supportedVideoZoomFactorsForDepthDataDelivery], -[AVCaptureDeviceFormat videoMinZoomFactorForCenterStage] and -[AVCaptureDeviceFormat videoMaxZoomFactorForCenterStage]
1928 | */
1929 | @property(nonatomic) CGFloat videoZoomFactor API_AVAILABLE(ios(7.0), macCatalyst(14.0), tvos(17.0)) API_UNAVAILABLE(macos, visionos);
| `- note: 'videoZoomFactor' has been explicitly marked unavailable here
1930 |
1931 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:223:49: error: 'default(_:for:position:)' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
218 | }
219 |
220 | func startCameraSession() {
| `- note: add '@available' attribute to enclosing instance method
221 | serialQueue.async {
222 | let captureSession = self.captureSession
223 | if let device = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) {
| |- error: 'default(_:for:position:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
224 | captureSession.beginConfiguration()
225 | defer {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:223:58: error: 'builtInWideAngleCamera' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
218 | }
219 |
220 | func startCameraSession() {
| `- note: add '@available' attribute to enclosing instance method
221 | serialQueue.async {
222 | let captureSession = self.captureSession
223 | if let device = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) {
| |- error: 'builtInWideAngleCamera' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
224 | captureSession.beginConfiguration()
225 | defer {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:250:38: error: 'isHighResolutionCaptureEnabled' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
218 | }
219 |
220 | func startCameraSession() {
| `- note: add '@available' attribute to enclosing instance method
221 | serialQueue.async {
222 | let captureSession = self.captureSession
:
248 | }
249 |
250 | self.photoOutput.isHighResolutionCaptureEnabled = true
| |- error: 'isHighResolutionCaptureEnabled' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
251 | self.photoOutput.maxPhotoQualityPrioritization = .quality
252 | guard captureSession.canAddOutput(self.photoOutput) else {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:251:38: error: 'maxPhotoQualityPrioritization' is only available in macOS 13.0 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
218 | }
219 |
220 | func startCameraSession() {
| `- note: add '@available' attribute to enclosing instance method
221 | serialQueue.async {
222 | let captureSession = self.captureSession
:
249 |
250 | self.photoOutput.isHighResolutionCaptureEnabled = true
251 | self.photoOutput.maxPhotoQualityPrioritization = .quality
| |- error: 'maxPhotoQualityPrioritization' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
252 | guard captureSession.canAddOutput(self.photoOutput) else {
253 | return
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:258:49: error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
:
218 | }
219 |
220 | func startCameraSession() {
| `- note: add '@available' attribute to enclosing instance method
221 | serialQueue.async {
222 | let captureSession = self.captureSession
:
256 | captureSession.addOutput(self.photoOutput)
257 |
258 | let captureMetadataOutput = AVCaptureMetadataOutput()
| |- error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
259 | captureSession.addOutput(captureMetadataOutput)
260 | captureMetadataOutput.setMetadataObjectsDelegate(self.delegate, queue: self.barcodeQueue)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:280:43: error: cannot find 'UIApplication' in scope
278 |
279 | func videoOrientationFromCurrentDeviceOrientation() -> AVCaptureVideoOrientation {
280 | guard let deviceOrientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation else {
| `- error: cannot find 'UIApplication' in scope
281 | return .portrait
282 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:301:9: error: static method 'buildExpression' requires that 'ScanBarcodesView' conform to 'View'
299 | struct ScanBarcodesView_Previews: PreviewProvider {
300 | static var previews: some View {
301 | ScanBarcodesView(barcodeTypes: [.qr]) { result in
| `- error: static method 'buildExpression' requires that 'ScanBarcodesView' conform to 'View'
302 | //nothing to do
303 | }
SwiftUI.ViewBuilder.buildExpression:2:20: note: where 'Content' = 'ScanBarcodesView'
1 | struct ViewBuilder {
2 | public static func buildExpression<Content>(_ content: Content) -> Content where Content : View}
| `- note: where 'Content' = 'ScanBarcodesView'
3 |
[4/4] Emitting module ScanBarcodes
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:9:6: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
| `- error: 'Binding' is only available in macOS 10.15 or newer
10 | @Binding var flashlightOn: Bool
11 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:10:6: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
| `- error: 'Binding' is only available in macOS 10.15 or newer
11 |
12 | public let barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType]
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:12:31: error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
11 |
12 | public let barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType]
| `- error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
13 | public var completion: (Result<String, BarcodeScanError>) -> Void
14 | public var scanRateDelay: Double
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:17:24: error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
| `- error: 'AVMetadataMachineReadableCodeObject' is only available in macOS 10.15 or newer
18 | zoomLevel : Binding<Int> = .constant(1),
19 | flashlightOn: Binding<Bool> = .constant(false),
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:18:21: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
18 | zoomLevel : Binding<Int> = .constant(1),
| `- error: 'Binding' is only available in macOS 10.15 or newer
19 | flashlightOn: Binding<Bool> = .constant(false),
20 | scanRateDelay: Double = 5,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:19:23: error: 'Binding' is only available in macOS 10.15 or newer
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- note: add '@available' attribute to enclosing struct
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
:
14 | public var scanRateDelay: Double
15 |
16 | public init(
| `- note: add '@available' attribute to enclosing initializer
17 | barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType],
18 | zoomLevel : Binding<Int> = .constant(1),
19 | flashlightOn: Binding<Bool> = .constant(false),
| `- error: 'Binding' is only available in macOS 10.15 or newer
20 | scanRateDelay: Double = 5,
21 | completion: @escaping (Result<String, BarcodeScanError>) -> Void) {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:33:47: error: cannot find type 'Context' in scope
31 | }
32 |
33 | public func makeUIViewController(context: Context) -> ScanBarcodesViewController {
| `- error: cannot find type 'Context' in scope
34 | let viewC = ScanBarcodesViewController(flashlightOn, zoomLevel)
35 | viewC.delegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:39:97: error: cannot find type 'Context' in scope
37 | }
38 |
39 | public func updateUIViewController(_ uiViewController: ScanBarcodesViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
40 | // update flashlight and zoom level
41 | guard let _ = AVCaptureDevice.default(for: .video) else {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:63:23: error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
51 |
52 |
53 | public class ScanBarcodesCoordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
| `- note: add '@available' attribute to enclosing class
54 | var parent: ScanBarcodesView
55 | private var lastBarcodeScanned: String = ""
:
60 | }
61 |
62 | public func metadataOutput(
| `- note: add '@available' attribute to enclosing instance method
63 | _ output: AVCaptureMetadataOutput,
| `- error: 'AVCaptureMetadataOutput' is only available in macOS 13.0 or newer
64 | didOutput metadataObjects: [AVMetadataObject],
65 | from connection: AVCaptureConnection) {
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:90:46: error: cannot find type 'UIViewController' in scope
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- error: cannot find type 'UIViewController' in scope
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:93:27: error: 'AVCapturePhotoOutput' is only available in macOS 10.15 or newer
88 | }
89 |
90 | public class ScanBarcodesViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
91 | var delegate: ScanBarcodesCoordinator?
92 | var captureSession = AVCaptureSession()
93 | let photoOutput = AVCapturePhotoOutput()
| `- error: 'AVCapturePhotoOutput' is only available in macOS 10.15 or newer
94 | let serialQueue = DispatchQueue(label: "AVCaptureSession")
95 | let barcodeQueue = DispatchQueue(label: "BarcodeDetection")
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:112:30: error: method does not override any method from its superclass
110 | }
111 |
112 | public override func viewDidLoad() {
| `- error: method does not override any method from its superclass
113 | super.viewDidLoad()
114 | NotificationCenter.default.addObserver(
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:122:30: error: method does not override any method from its superclass
120 | }
121 |
122 | override public func viewWillAppear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
123 | super.viewWillAppear(animated)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:134:30: error: method does not override any method from its superclass
132 | }
133 |
134 | override public func viewWillDisappear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
135 | stopSessionAndRemoveCameraInputOutput()
136 | NotificationCenter.default.removeObserver(self)
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:140:30: error: method does not override any method from its superclass
138 | }
139 |
140 | public override func viewDidAppear(_ animated: Bool) {
| `- error: method does not override any method from its superclass
141 | super.viewDidAppear(animated)
142 | updateOrientation()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:145:30: error: method does not override any method from its superclass
143 | }
144 |
145 | override public func viewWillLayoutSubviews() {
| `- error: method does not override any method from its superclass
146 | previewLayer?.frame = view.layer.bounds
147 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:149:84: error: cannot find type 'UIViewControllerTransitionCoordinator' in scope
147 | }
148 |
149 | public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
| `- error: cannot find type 'UIViewControllerTransitionCoordinator' in scope
150 | coordinator.animate(alongsideTransition: { (UIViewControllerTransitionCoordinatorContext) -> Void in
151 | self.previewLayer.connection?.videoOrientation = self.videoOrientationFromCurrentDeviceOrientation()
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:160:61: error: cannot find type 'UIInterfaceOrientationMask' in scope
158 | }
159 |
160 | public override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
| `- error: cannot find type 'UIInterfaceOrientationMask' in scope
161 | return .all
162 | }
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:170:58: error: cannot find type 'UITouch' in scope
168 | }
169 |
170 | public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
| `- error: cannot find type 'UITouch' in scope
171 | guard touches.first?.view == view,
172 | let touchPoint = touches.first,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:170:80: error: cannot find type 'UIEvent' in scope
168 | }
169 |
170 | public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
| `- error: cannot find type 'UIEvent' in scope
171 | guard touches.first?.view == view,
172 | let touchPoint = touches.first,
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:8:33: error: cannot find type 'UIViewControllerRepresentable' in scope
6 | }
7 |
8 | public struct ScanBarcodesView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | @Binding var zoomLevel: Int
10 | @Binding var flashlightOn: Bool
/Users/admin/builder/spi-builder-workspace/Sources/ScanBarcodes/ScanBarcodesView.swift:300:31: error: 'View' is only available in macOS 10.15 or newer
297 | }
298 |
299 | struct ScanBarcodesView_Previews: PreviewProvider {
| `- note: add '@available' attribute to enclosing struct
300 | static var previews: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing static property
301 | ScanBarcodesView(barcodeTypes: [.qr]) { result in
302 | //nothing to do
BUILD FAILURE 6.3 macosSpm