Skip to main content

BRScanOptions

Configures the behavior of a scan session. Create one instance, set the properties you need, and pass it to BRScanManager.shared().startStaticCamera(...).

Declaration

@interface BRScanOptions : NSObject
class BRScanOptions : NSObject

Quick Reference

Properties

PropertyDescription
retailerIdIf the retailer is known in advance, pass the appropriate value to improve recognition accuracy.
enableBlinkEngageActivates the BlinkEngage monetization flow for this scan session.
appearanceOptional styling for the SDK's stock scan UI via a BRAppearanceTheme subclass.
detectDuplicatesWhen YES, checks whether the receipt has been scanned before.
validatePromotionsWhen YES, attempts to validate scan results against configured promotions.
promotionSlugsOne or more promotion slugs to validate against.
returnRawTextWhen YES, calls -[BRScanResultsDelegate didOutputRawText:] with raw OCR text.
returnVoidedProductsWhen YES, voided products are included in results.
returnSubproductsWhen YES, sub-products are returned nested within their parent product.
storeUserFramesWhen YES, user-confirmed frames are written to disk; client is responsible for deletion.
countryCodeISO 2-character country code for the receipts being scanned.
detectLogoWhen YES, the SDK attempts to detect the merchant logo on the receipt.
detectWrongRetailerWhen YES, verifies the retailer and fires a delegate callback if a mismatch is detected.
debugModeWhen YES, all parsed frames are stored for inclusion in a debug email.
jpegCompressionQualityJPEG compression quality factor for frame images.
tooFarThresholdControls when the "Move Closer" guidance appears.
edgesEveryNthFrameHow often edge detection runs, expressed as a frame interval.
detectDistanceWithEdgesWhen YES, distance from the receipt is determined via edge detection.
numGoodFramesToStopEdgesNumber of consecutive frames above the threshold before edge detection stops.
restartEdgesAfterUserConfirmWhen YES, edge detection restarts after the user confirms a frame.
enableEdgesAfterUserPhotoWhen YES, edge detection continues after the user manually snaps a photo.
beginEdgesImmediatelyWhen YES, edge detection begins immediately at session start.
previousFrameOverlapNumber of pixels from the previous frame to show as an overlap guide.
enableDateChipWhen YES, a date chip is shown after receipt recognition completes.
enableTotalChipWhen YES, a total chip is shown after receipt recognition completes.
enableMerchantChipWhen YES, a merchant chip is shown after receipt recognition completes.
enableDynamicTextSizingWhen YES, the scan UI adapts to the user's text size preference from Settings or Accessibility.
manualTorchControlWhen YES, client manages torch; SDK fires lighting condition callbacks.
disableOnDeviceProcessingWhen YES, the SDK does not perform on-device frame processing.
clientUsesScanditCameraSet to YES if the client uses a Scandit camera independently; enables a camera-bug fix.

Properties

retailerId

@property (nonatomic) WFRetailerId retailerId;
var retailerId: WFRetailerId { get set }

If the retailer is known in advance, pass the appropriate value from the WFRetailerId enum to improve recognition accuracy.


enableBlinkEngage

@property (nonatomic) BOOL enableBlinkEngage;
var enableBlinkEngage: Bool { get set }

Activates the BlinkEngage monetization flow for this scan session. When YES, BlinkEngage intercepts scan results and handles the post-scan screen. The didFinishScanning:withScanResults: delegate callback still fires but scanResults is always nil. See BlinkEngage Integration.

Default: NO


appearance

@property (nonatomic, strong, nullable) BRAppearanceTheme *appearance;
var appearance: BRAppearanceTheme? { get set }

Optional styling for the SDK's stock scan UI (help sheet, onboarding, camera toolbar, and related surfaces). Assign a BRAppearanceTheme subclass that overrides colorForKey: and/or imageForKey:; return nil for any key you don't customize and the SDK keeps its built-in value. Leave nil to use built-in styling everywhere.

Default: nil (SDK defaults)


detectDuplicates

@property (nonatomic) BOOL detectDuplicates;
var detectDuplicates: Bool { get set }

When YES, the SDK checks whether the receipt has been scanned before and sets BRScanResults.isDuplicate and isFraudulent accordingly.

Default: NO


validatePromotions

@property (nonatomic) BOOL validatePromotions;
var validatePromotions: Bool { get set }

When YES, the SDK attempts to validate scan results against configured promotions.

Default: NO


promotionSlugs

@property (nonatomic, strong) NSArray *promotionSlugs;
var promotionSlugs: [Any]! { get set }

One or more promotion slugs to validate against when validatePromotions is YES.


returnRawText

@property (nonatomic) BOOL returnRawText;
var returnRawText: Bool { get set }

Whether to return the raw OCR text. If YES, -[BRScanResultsDelegate didOutputRawText:] will be called.

Default: NO


returnVoidedProducts

@property (nonatomic) BOOL returnVoidedProducts;
var returnVoidedProducts: Bool { get set }

When YES, voided products are included in results with BRProduct.isVoided set to YES.

Default: NO


returnSubproducts

@property (nonatomic) BOOL returnSubproducts;
var returnSubproducts: Bool { get set }

When YES, sub-products are returned nested within their parent product's subProducts array.

Default: NO


storeUserFrames

@property (nonatomic) BOOL storeUserFrames;
var storeUserFrames: Bool { get set }

Whether to write user-confirmed frames to disk. If YES, after a scanning session BRScanManager.userFramesFilepaths will contain the local paths. You are responsible for deleting these images when done.

Default: NO


countryCode

@property (nonatomic, strong) NSString *countryCode;
var countryCode: String! { get set }

ISO 2-character country code for the receipts being scanned.

Default: nil (auto-detected)


@property (nonatomic) BOOL detectLogo;
var detectLogo: Bool { get set }

When YES, the SDK attempts to detect the merchant logo on the receipt.

Default: YES


detectWrongRetailer

@property (nonatomic) BOOL detectWrongRetailer;
var detectWrongRetailer: Bool { get set }

Whether the SDK should attempt to verify that the user is scanning a receipt from the specified retailer. If a different retailer is detected, -[BRCameraViewController didDetectWrongRetailer:withConfidence:] fires, letting the client decide whether to continue.

Default: NO


debugMode

@property (nonatomic) BOOL debugMode;
var debugMode: Bool { get set }

When YES, all parsed frames are stored for inclusion in a debug email.

Default: NO


jpegCompressionQuality

@property (nonatomic) float jpegCompressionQuality;
var jpegCompressionQuality: Float { get set }

JPEG compression quality factor for frame images passed to UIImageJPEGRepresentation.

Default: 0.9


tooFarThreshold

@property (nonatomic) NSInteger tooFarThreshold;
var tooFarThreshold: Int { get set }

Controls when the "Move Closer" message appears. A percentage (1–99): if the detected receipt width divided by the full image width falls below this value, the "too far" flag is set.

Default: 80


edgesEveryNthFrame

@property (nonatomic) NSInteger edgesEveryNthFrame;
var edgesEveryNthFrame: Int { get set }

How often edge detection runs on camera frames. Must be an even integer between 2 and 30. For example, 8 means edge detection runs every 8th frame.

Default: 6


detectDistanceWithEdges

@property (nonatomic) BOOL detectDistanceWithEdges;
var detectDistanceWithEdges: Bool { get set }

When YES, distance from the receipt is determined via edge detection.

Default: NO


numGoodFramesToStopEdges

@property (nonatomic) NSInteger numGoodFramesToStopEdges;
var numGoodFramesToStopEdges: Int { get set }

Number of consecutive frames above the threshold before edge detection stops.

Default: 2


restartEdgesAfterUserConfirm

@property (nonatomic) BOOL restartEdgesAfterUserConfirm;
var restartEdgesAfterUserConfirm: Bool { get set }

If numGoodFramesToStopEdges > 0, allows edge detection to restart after the user confirms a frame.

Default: NO


enableEdgesAfterUserPhoto

@property (nonatomic) BOOL enableEdgesAfterUserPhoto;
var enableEdgesAfterUserPhoto: Bool { get set }

When YES, edge detection continues after the user manually snaps a photo.

Default: NO


beginEdgesImmediately

@property (nonatomic) BOOL beginEdgesImmediately;
var beginEdgesImmediately: Bool { get set }

Whether the SDK should begin edge detection immediately at session start, rather than establishing frame quality baselines first.

Default: NO


previousFrameOverlap

@property (nonatomic) NSInteger previousFrameOverlap;
var previousFrameOverlap: Int { get set }

Number of pixels from the previous frame to show as an overlap guide when the user adds a new frame.

Default: 72


enableDateChip

@property (nonatomic) BOOL enableDateChip;
var enableDateChip: Bool { get set }

When YES, a date chip is shown after receipt recognition completes.

Default: NO


enableTotalChip

@property (nonatomic) BOOL enableTotalChip;
var enableTotalChip: Bool { get set }

When YES, a total chip is shown after receipt recognition completes.

Default: NO


enableMerchantChip

@property (nonatomic) BOOL enableMerchantChip;
var enableMerchantChip: Bool { get set }

When YES, a merchant chip is shown after receipt recognition completes.

Default: NO


enableDynamicTextSizing

@property (nonatomic) BOOL enableDynamicTextSizing;
var enableDynamicTextSizing: Bool { get set }

If enabled, the stock camera controller's UI adjusts based on the user's text size preference from Settings or Accessibility.

Default: NO


manualTorchControl

@property (nonatomic) BOOL manualTorchControl;
var manualTorchControl: Bool { get set }

Whether the client will control the torch manually (should only be used with a custom BRCameraViewController subclass). When enabled, -[BRCameraViewController didGetLightingCondition:] notifies the client of lighting changes.

Default: NO


disableOnDeviceProcessing

@property (nonatomic) BOOL disableOnDeviceProcessing;
var disableOnDeviceProcessing: Bool { get set }

When YES, the SDK does not perform on-device frame processing. Use for server-side processing workflows.

Default: NO


clientUsesScanditCamera

@property (nonatomic) BOOL clientUsesScanditCamera;
var clientUsesScanditCamera: Bool { get set }

Whether the client uses a Scandit camera independently of the BlinkReceipt SDK. When enabled, BlinkReceipt incorporates a fix for an inconsistent camera bug that occurs in this scenario.

Default: NO