No description, website, or topics provided.
Clone or download
Latest commit 413e38d Dec 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BlinkReceipt.framework v1.6.6 Dec 4, 2018
Demo/BRDemo clean up demo project Mar 7, 2018
.gitignore v1.3.6 Jan 11, 2018
BlinkReceipt.podspec v1.6.6 Dec 4, 2018
LICENSE v1.1.4 Aug 10, 2017
README.md remove live scan mode Mar 7, 2018

README.md

BlinkReceipt Integration Instructions

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like BlinkReceipt in your projects. If you do not have Cocoapods installed, see the Getting Started Guide.

Podfile

source 'https://github.com/BlinkReceipt/PodSpecRepo.git'
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

target 'YourTarget' do
  use_frameworks!

  pod 'BlinkReceipt', '~> 1.0'
end
  • Note: If you plan to use Scandit barcode scanning, please also add the following line to your Podfile:
pod 'BRScandit', '~> 2.0'

After editing your Podfile, run pod install and then make sure to open the .xcworkspace file rather than the .xcodeproj

Integration

  • Add the following to the top of your AppDelegate.m:
#import <BlinkReceipt/BlinkReceipt.h>
  • Add the following to the applicationDidFinishLaunching: method:
[BRScanManager sharedManager].licenseKey = @"YOUR-LICENSE-KEY";
  • If you have a Scandit app key (and included the BRScandit pod above) then add it as follows:
[BRScanManager sharedManager].scanditAppKey = @"YOUR-SCANDIT-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>
  • Add the following code to an IBAction handler in your view controller:
- (IBAction)btnTouched:(id)sender {
  BRScanOptions *scanOptions = [BRScanOptions new];
  
  [[BRScanManager sharedManager] startStaticCameraFromController:self
                                                     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
}

Custom Camera Controller UI

You can also build out your own UI that sits on top of our basic camera controller. To do so, all you have to do is subclass BRCameraViewController and create your UI programmatically or in Interface Builder as normal.

#import <BlinkReceipt/BlinkReceipt.h>

@interface MyCameraController : BRCameraViewController
  • Note that you must set the background of your view to be transparent so that the camera controller underneath will be visible.

Your camera controller interacts with properties and methods of its superclass to facilitate the scanning experience. For details refer to BRCameraViewController.h

To begin scanning with your custom controller use the following in your IBAction handler:

MyCameraController *cameraController = [MyCameraController new]; //or instantiate from storyboard

[[BRScanManager sharedManager] startCustomCamera:cameraController
                                  fromController:self
                                     scanOptions:scanOptions
                                    withDelegate:self];

Copyright (c) 2017 BlinkReceipt. All rights reserved.