Skip to content

Commit

Permalink
fix: available on catalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Fallet authored Feb 23, 2024
1 parent 259c54e commit 5a49d03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ extension CodeScannerView {

// MARK: - AVCaptureMetadataOutputObjectsDelegate

@available(macCatalyst 14.0, *)
extension CodeScannerView.ScannerViewController: AVCaptureMetadataOutputObjectsDelegate {
public func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
if let metadataObject = metadataObjects.first {
Expand Down Expand Up @@ -478,6 +479,7 @@ extension CodeScannerView.ScannerViewController: AVCaptureMetadataOutputObjectsD

// MARK: - UIImagePickerControllerDelegate

@available(macCatalyst 14.0, *)
extension CodeScannerView.ScannerViewController: UIImagePickerControllerDelegate {
public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
isGalleryShowing = false
Expand Down Expand Up @@ -521,6 +523,7 @@ extension CodeScannerView.ScannerViewController: UIImagePickerControllerDelegate

// MARK: - UIAdaptivePresentationControllerDelegate

@available(macCatalyst 14.0, *)
extension CodeScannerView.ScannerViewController: UIAdaptivePresentationControllerDelegate {
public func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
// Gallery is no longer being presented
Expand Down

0 comments on commit 5a49d03

Please sign in to comment.