iOS Paper Integration
Installation
Installation instructions can be found in our Installation Guide.
Integration
- Add the following to the top of your
AppDelegate.m:
#import <BlinkReceipt/BlinkReceipt.h>
Or if you are using Carthage or standalone installation:
#import <BlinkReceiptStatic/BlinkReceiptStatic.h>
- Add the following to the
applicationDidFinishLaunching:method:
[BRScanManager sharedManager].licenseKey = @"YOUR-LICENSE-KEY";
[BRScanManager sharedManager].prodIntelKey = @"YOUR-PROD-INTEL-KEY";
- The simplest way to test the SDK is by launching our prepackaged scanning experience.
Prepackaged Scanning Experience
This scanning mode simulates the user snapping a series of still photos, although in fact live video frames are actually being scanned in the background. To test this:
- Add the following code to the top of your view controller:
#import <BlinkReceipt/BlinkReceipt.h>
Or if you are using Carthage or standalone installation:
#import <BlinkReceiptStatic/BlinkReceiptStatic.h>
- Add the following code to an IBAction handler in your view controller:
- (IBAction)btnTouched:(id)sender {
BRScanOptions *scanOptions = [BRScanOptions new];
[[BRScanManager sharedManager] startStaticCameraFromController:self
cameraType:BRCameraUXStandard
scanOptions:scanOptions
withDelegate:self];
}
- Declare your view controller to conform to
BRScanResultsDelegate:
@interface MyViewController () <BRScanResultsDelegate>
- Implement the delegate callback to handle scan results:
- (void)didFinishScanning:(UIViewController *)cameraViewController withScanResults:(BRScanResults *)scanResults {
[cameraViewController dismissViewControllerAnimated:YES completion:nil];
//Use scan results
}
Enhanced Camera UX
We have updated our prepackaged camera controller with a new UI/UX. There are changes to the graphics, the messaging, the animations, and some added features. To test it out try this:
- (IBAction)btnTouched:(id)sender {
BRScanOptions *scanOptions = [BRScanOptions new];
[[BRScanManager sharedManager] startStaticCameraFromController:self
cameraType:BRCameraUXEnhanced
scanOptions:scanOptions
withDelegate:self];
}
Data Chips
The enhanced UX supports 3 "chips" which indicate to the user whether the date, total, or merchant has been successfully detected in the receipt. By default, all these chips are disabled. You can enable them by setting their respective properties in the BRScanOptions object:
BRScanOptions.enableDateChipBRScanOptions.enableTotalChipBRScanOptions.enableMerchantChip
Certain methods for detecting merchant are only performed at the end of the scan session so it will occasionally occur that the merchant chip is not filled in, but when the user ends the scan session, a merchant will then be detected and returned in the BRScanResults object.
Custom Camera Controller UI
You can also build out your own UI that sits on top of our basic camera controller. Check out our Custom Camera Controller guide for further details.