From 47c0032429a3890819736a6f8d2da308e8fa4df3 Mon Sep 17 00:00:00 2001 From: Ido Date: Tue, 11 Jan 2022 17:47:31 +0200 Subject: [PATCH 1/2] Fix deprecated code Fix warning: Using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead --- SwiftDocumentScanner/Classes/Detectors/AutoDetector.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftDocumentScanner/Classes/Detectors/AutoDetector.swift b/SwiftDocumentScanner/Classes/Detectors/AutoDetector.swift index 5f6642b..b62270d 100644 --- a/SwiftDocumentScanner/Classes/Detectors/AutoDetector.swift +++ b/SwiftDocumentScanner/Classes/Detectors/AutoDetector.swift @@ -8,7 +8,7 @@ import CoreImage import CoreGraphics -public protocol AutoDetectorDelegate: class { +public protocol AutoDetectorDelegate: AnyObject { func detector(update: Observation) func detector(success: Observation) From c8a944dc2a7c7b53b573452507d666a8c6c0fdeb Mon Sep 17 00:00:00 2001 From: Ido Date: Tue, 11 Jan 2022 17:49:38 +0200 Subject: [PATCH 2/2] Fix deprecated code Fix warning: Using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead --- .../Classes/Controllers/CameraViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftDocumentScanner/Classes/Controllers/CameraViewController.swift b/SwiftDocumentScanner/Classes/Controllers/CameraViewController.swift index 75991ac..f317d2b 100644 --- a/SwiftDocumentScanner/Classes/Controllers/CameraViewController.swift +++ b/SwiftDocumentScanner/Classes/Controllers/CameraViewController.swift @@ -9,7 +9,7 @@ import AVFoundation import Foundation import UIKit -public protocol CameraViewControllerDelegate: class { +public protocol CameraViewControllerDelegate: AnyObject { func cameraViewController(didFocus point: CGPoint) func cameraViewController(update status: AVAuthorizationStatus)