twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
1.01k stars 286 forks source link

Cannot build for Mac Catalyst #56

Closed Terabyte1385 closed 2 years ago

Terabyte1385 commented 2 years ago

This package claims to be able to run on Mac Catalyst 14 or later, but I cannot build my project for Mac Catalyst because some @available lines are missing (according to Xcode).

Errors Found: ScannerViewController.swift:12:11: 'CodeScannerView' is only available in Mac Catalyst 14.0 or newer ScannerCoordinator.swift:12:11: 'CodeScannerView' is only available in Mac Catalyst 14.0 or newer CodeScanner.swift:32:22: 'AVMetadataObject' is only available in Mac Catalyst 14.0 or newer

If it matters, the project is aimed at iOS 15 and macOS 12.

AVMetadataObject, for example, requires Mac Catalyst 14 or later, and this package is capable to handle AVMetadataObject correctly, but for some reason Xcode cannot build.

Terabyte1385 commented 2 years ago
Screenshot 2022-02-03 at 20 04 12
garthvh commented 2 years ago

I am having the same issue macOS 12, catalyst 15

NgocLK commented 2 years ago

I'm having the same issue, can anyone help?