Skip to content

Commit b1acc06

Browse files
authored
Merge pull request #79 from twostraws/catalyst
Fixing Catalyst issues
2 parents c76835b + 29ef1d9 commit b1acc06

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Sources/CodeScanner/CodeScanner.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public enum ScanError: Error {
2727
/// The result from a successful scan: the string that was scanned, and also the type of data that was found.
2828
/// The type is useful for times when you've asked to scan several different code types at the same time, because
2929
/// it will report the exact code type that was found.
30+
@available(macCatalyst 14.0, *)
3031
public struct ScanResult {
3132
/// The contents of the code.
3233
public let string: String

Sources/CodeScanner/ScannerCoordinator.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
import AVFoundation
1010
import SwiftUI
1111

12+
@available(macCatalyst 14.0, *)
1213
extension CodeScannerView {
13-
@available(macCatalyst 14.0, *)
14+
1415
public class ScannerCoordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
1516
var parent: CodeScannerView
1617
var codesFound = Set<String>()
@@ -88,4 +89,5 @@ extension CodeScannerView {
8889
parent.completion(.failure(reason))
8990
}
9091
}
92+
9193
}

Sources/CodeScanner/ScannerViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import AVFoundation
1010
import UIKit
1111

12+
@available(macCatalyst 14.0, *)
1213
extension CodeScannerView {
1314

14-
@available(macCatalyst 14.0, *)
1515
public class ScannerViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
1616

1717
var delegate: ScannerCoordinator?

0 commit comments

Comments
 (0)