BRScanResultsDelegate
Objective-C
@protocol BRScanResultsDelegate <NSObject>
Swift
protocol BRScanResultsDelegate : NSObjectProtocol
Implement this protocol to receive callbacks from a scanning session
-
Indicates that the scanning session has ended
Declaration
Objective-C
- (void)didFinishScanning:(UIViewController *)cameraViewController withScanResults:(BRScanResults *)scanResults;Swift
optional func didFinishScanning(_ cameraViewController: UIViewController!, with scanResults: BRScanResults!)Parameters
cameraViewControllerThe subclass of
BRCameraViewControllerto dismissscanResultsThe results of the scanning session. Always nil if BRScanManager.enableBlinkEngage is set to true
-
Indicates that the scanning session has been cancelled
Declaration
Objective-C
- (void)didCancelScanning:(UIViewController *)cameraViewController;Swift
optional func didCancelScanning(_ cameraViewController: UIViewController!)Parameters
cameraViewControllerThe subclass of
BRCameraViewControllerto dismiss -
If
BRScanOptions.returnRawTextwas enabled, this callback will be invoked after each scanned frame with raw OCR resultsDeclaration
Objective-C
- (void)didOutputRawText:(NSString *)rawText;Swift
optional func didOutputRawText(_ rawText: String!)Parameters
rawTextThe raw OCR results
-
This callback indicates an error occurred during scanning
Declaration
Objective-C
- (void)scanningErrorOccurred:(NSError *)error;Swift
optional func scanningErrorOccurred(_ error: (any Error)!)Parameters
errorThe error that occurred during scanning
-
This callback provides encrypted debugging information that can be used to help identify crashes. For example, if the client app uses Firebase Crashlytics, this can be passed along as follows:
[[FIRCrashlytics crashlytics] log:debugInfo];Declaration
Objective-C
- (void)didOutputDebugInfo:(NSString *)debugInfo;Swift
optional func didOutputDebugInfo(_ debugInfo: String!)Parameters
debugInfoThe encrypted debugging information
-
This callback provides debugging information as key value pairs. For example, if the client app uses Firebase Crashlytics, this can be passed as a custom attribute as follows:
[[FIRCrashlytics crashlytics] setCustomValue:val forKey:key];Declaration
Objective-C
- (void)didOutputDebugKey:(NSString *)key withValue:(id)val;Swift
optional func didOutputDebugKey(_ key: String!, withValue val: Any!)Parameters
keyDescription of the type of debugging information
valThe information itself
-
Declaration
Objective-C
- (void)didReturnAttributes:(BRFrameAttributes*)attributes forImageIndex:(NSInteger)index;Swift
optional func didReturn(_ attributes: BRFrameAttributes!, forImageIndex index: Int)
View on GitHub