Protocols Reference
The following protocols are available globally.
BRScanResultsDelegate
Implement this protocol to receive callbacks from a scanning session.
Declaration
@protocol BRScanResultsDelegate <NSObject>
protocol BRScanResultsDelegate : NSObjectProtocol
Methods
didEncounterCameraError:
- (void)didEncounterCameraError:(NSError *)error;
func didEncounterCameraError(_ error: Error)
Optional. Indicates that a camera-level error occurred. This is distinct from scanningErrorOccurred:, which reports SDK-level errors using BRErrorCodes.
Errors reported here may come directly from AVFoundation — for example, from an AVCaptureSessionRuntimeErrorNotification or an AVCapturePhotoCaptureDelegate callback, in which case error.domain is AVFoundationErrorDomain — or from the SDK's own camera setup/configuration logic, in which case error.domain is BRCameraErrorDomain and error.code is a BRCameraErrorCode.
Parameters:
| Parameter | Description |
|---|---|
error | The camera-level error that occurred |
BRSerializable
All BlinkReceipt results objects implement this protocol to provide an easy method for serializing results into JSON (or other formats). You can call dictionaryForSerializing on any results object or sub-object and get an NSDictionary * suitable for serialization (contains no custom classes).
Declaration
@protocol BRSerializable
protocol BRSerializable