Classes
The following classes are available globally.
-
Customizes colors and icons in the SDK’s stock scan UI (help sheet, onboarding, camera toolbar, and related surfaces).
Subclass
BRAppearanceThemeand overridecolorForKey:and / orimageForKey:to supply your own values, then assign an instance toBRScanOptions.appearancebefore you start a scan. Both methods use an opt-in model: returnnilfor any key you don’t want to customize and the SDK keeps its built-in value. The base implementation returnsnilfor every key, so an unmodifiedBRAppearanceThemeis equivalent to leavingBRScanOptions.appearanceset tonil.The SDK queries the theme each time the relevant control is configured, so values may be read more than once per scan session and should be cheap to produce. You can swap themes between scans (for example, to react to light / dark mode) by assigning a new instance.
Example (Objective-C):
@interface MyAppearanceTheme : BRAppearanceTheme @end @implementation MyAppearanceTheme - (UIColor *)colorForKey:(BRAppearanceColorKey)key { if (key == BRAppearanceColorKeyHelpModalCloseButtonBackground) { return UIColor.systemBlueColor; } return nil; } @end BRScanOptions *options = [BRScanOptions new]; options.appearance = [MyAppearanceTheme new];Example (Swift):
See morefinal class MyAppearanceTheme: BRAppearanceTheme { override func color(for key: BRAppearanceColorKey) -> UIColor? { key == .helpModalCloseButtonBackground ? .systemBlue : nil } } let options = BRScanOptions() options.appearance = MyAppearanceTheme()Declaration
Objective-C
@interface BRAppearanceTheme : NSObjectSwift
class BRAppearanceTheme : NSObject -
Base camera controller class. Subclass to build your own UI on top of the fullscreen camera view
See moreDeclaration
Objective-C
@interface BRCameraViewController : UIViewControllerSwift
class BRCameraViewController : UIViewController -
Describes one coupon or discount on a receipt
See moreDeclaration
Objective-C
@interface BRCoupon : NSObject <BRSerializable>Swift
class BRCoupon : NSObject, BRSerializable -
Declaration
Objective-C
@interface BRFrameAttributes : NSObjectSwift
class BRFrameAttributes : NSObject -
Declaration
Objective-C
@interface BRMissedEarningsBaseViewController : UIViewController /** * This property restricts the region in which barcode will be detected. The parametesr are specified as percentages of the view size. The default value is `(0.0, 0.0, 1.0, 1.0)` */ @property (nonatomic) CGRect scanningRegion; /** * Due to differences in barcode lengths, specifying the country code helps determine the correct barcode length the SDK should detect */ @property (nonatomic, strong) NSString *countryCode; /** * Override this method to be notified when a barcode is detected. Supports 12 digit and 6 digit UPC's. */ - (void)didDetectBarcode:(NSString*)barcode; /** * Perform server lookup of this UPC * * @param completion This callback is invoked when the lookup completes (or fails) * * `BRMissedEarningsLookupResult lookupResult` - The status of the lookup indicating whether the supplied UPC participates in the program, does not participate, was not found, or if the lookup failed * * `NSDictionary *productInfo` - If the UPC was found, this dictionary contains information about the product. The keys are: `productName`, `brand`, `image_url`, and `brand_participates`, which is a boolean indicating whether this product's brand is part of the program. This helps identify scenarios where some products in a brand participate in the program, but the provided UPC does not. Additionally a `message` key which can contain a custom message for a given product */ - (void)lookupUPC:(NSString*)upc withCompletion:(void(^)(BRMissedEarningsLookupResult lookupResult, NSDictionary *productInfo))completion; /** * Toggle the status of the torch * * @param torchOn Whether to turn the torch on or off */ - (void)setTorch:(BOOL)torchOn; /** * When a barcode is found, the capture session is automatically paused. Invoke this method to restart the capture session afterwards. */ - (void)restartCaptureSession; @endSwift
class BRMissedEarningsBaseViewController : UIViewController -
Described a payment method and the amount charged to that payment method
See moreDeclaration
Objective-C
@interface BRPaymentMethod : NSObject <BRSerializable>Swift
class BRPaymentMethod : NSObject, BRSerializable -
Describes one product on a receipt
See moreDeclaration
Objective-C
@interface BRProduct : NSObject <BRSerializable>Swift
class BRProduct : NSObject, BRSerializable -
Represents an additional line of text attached to a product
See moreDeclaration
Objective-C
@interface BRProductAdditionalLine : NSObject <BRSerializable>Swift
class BRProductAdditionalLine : NSObject, BRSerializable -
Represents a promotion identified on the receipt
See moreDeclaration
Objective-C
@interface BRPromotion : NSObject <BRSerializable>Swift
class BRPromotion : NSObject, BRSerializable -
Represents information about a promotion retrieved for the current user
See moreDeclaration
Objective-C
@interface BRPromotionInfo : NSObject <BRSerializable>Swift
class BRPromotionInfo : NSObject, BRSerializable -
Declaration
Objective-C
@interface BRQualifiedProduct : NSObject<BRSerializable> @property (nonatomic, readonly) NSInteger productIndex; @property (strong, nonatomic, readonly) NSArray<NSString*> *productGroups; @endSwift
class BRQualifiedProduct : NSObject, BRSerializable -
This is the main interface for initiating scanning sessions
See moreDeclaration
Objective-C
@interface BRScanManager : NSObjectSwift
class BRScanManager : NSObject -
Create an instance of this class to specify the scanning options for a session
See moreDeclaration
Objective-C
@interface BRScanOptions : NSObjectSwift
class BRScanOptions : NSObject -
This class holds the scan results for a particular scanning session
See moreDeclaration
Objective-C
@interface BRScanResults : NSObject <BRSerializable>Swift
class BRScanResults : NSObject, BRSerializable -
Represents one shipment in an Amazon order
See moreDeclaration
Objective-C
@interface BRShipment : NSObject <BRSerializable>Swift
class BRShipment : NSObject, BRSerializable -
Represents a survey consisting of a series of multiple choice or open ended questions
See moreDeclaration
Objective-C
@interface BRSurvey : NSObjectSwift
class BRSurvey : NSObject -
Represents a multiple choice answer to a survey question
See moreDeclaration
Objective-C
@interface BRSurveyAnswer : NSObjectSwift
class BRSurveyAnswer : NSObject -
Represents a survey question, which is either multiple choice or open-ended
See moreDeclaration
Objective-C
@interface BRSurveyQuestion : NSObjectSwift
class BRSurveyQuestion : NSObject -
Represents a user response to a survey question
See moreDeclaration
Objective-C
@interface BRSurveyResponse : NSObjectSwift
class BRSurveyResponse : NSObject -
Parent class to hold a value and a confidence
See moreDeclaration
Objective-C
@interface BRValue : NSObject <BRSerializable>Swift
class BRValue : NSObject, BRSerializable -
Child class for all string values
See more -
Child class for all float values
See more -
Child class for all int values
See more
View on GitHub
Classes Reference