IDScan.net
Search Results for

    Show / Hide Table of Contents

    Multiscan SDK for iOS (MRZ + PDF417)

    Passport MRZ Scanner SDK for iOS

    Download: Multiscan Scanner SDK + example

    To obtain a license key, please email your application’s Bundle ID to support@idscan.net

    Setup

    Objective-C

    1. Add BarcodeScanner.framework to your project

      BarcodeScanner.framework

    2. Add BarcodeScanner.framework in Embedded Binaries Embedded Binaries

    3. Delete duplicate from “Linked Frameworks and Libraries” section

      Linked Frameworks and Libraries

    4. Add mrz_190307_022802.tflite in project Build Phases->Copy Bundle Resources

      Copy Bundle Resources

    5. Add ScannerViewController

      ScannerViewController

    6. Developers should send an email to support@idscan.net with their app’s Bundle ID in order to receive your “cameraKey”. Make sure you provide your order number if you ready to upgrade from trial to production.

    7. To register the library use for scan MRZ [scanner registerMRZKey:@"MRZKey"];

      CameraLibrary

      To register the library use for scan PDF417 [scanner registerCode:@"cameraKey"];

    Using

    1. To get the pdf417 result from the image utilize

      NSString* result = [scanner scanGrayscaleImage: frameBuffer Width: width Height: height];
      
    2. To get the MRZ result from the image utilize

      NSString *result = [self.scanner detectMRZ:frameBuffer width:(int)self->width height:(int)self->height];
      

      ImageResult

    3. If you plan to customize the camera interface , in the method (void) CustomeOverlay for all elements apply [self.view bringSubviewToFront:elementName];

      CustomizeInterface

    Swift

    In you Swift project you should follow the same way, as in the Objective-C:

    1. Add BarcodeScanner.framework and our camera class (ScannerViewController) to you project

    2. Make you own class and Inheritance it from ScannerViewController,  add a “Close” button to your Camera view controller (don’t forget to move the button to the front)

       class SwiftViewController: ScannerViewController {
        override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         let rect : CGRect = CGRect(x: 20, y: 20, width: 100, height: 30)
         let close: UIButton = UIButton(frame: rect)
         close.setTitle("Close", for: .normal)
         close.backgroundColor = UIColor.darkGray
         close.addTarget(self, action: #selector(closeBtn), for: .touchUpInside)
         self.view.addSubview(close)
         self.view.bringSubview(toFront: close)
        }
       }

    If you want to make you own Camera Class from scratch you should do this:

    1. Import BarcodeScanner.framework to you project
    import  BarcodeScanner
    1. Make instance of scanner
    var scanner = Barcode2DScanner()
    1. Register camera with you MRZ key
    scanner.registerMRZKey("MRZKey")
    
    1. Register pdf camera with you PDF417 key
    scanner.registerCode(forKey: "cameraKey")
    

    Using

    For MRZ call detectMRZ(UnsafeMutablePointer!, width: Int32, height: Int32) method from instance:

    var result = scanner.detectMRZ(UnsafeMutablePointer!, width: Int32, height: Int32)
    

    For PDF417 call scanGrayscaleImage(pp_image: width: height: ) method from instance:

    var result = scanner.scanGrayscaleImage(UnsafeMutablePointer!, width: Int32, height: Int32)
    

    Swift implementation of our framework you can download HERE.

    Note

    If you have "Could not find or use auto-linked library" while archiving your app it's xcode issue. You can find more about the problem and workaround by this link.

    In This Article
    • Setup
      • Objective-C
      • Using
      • Swift
      • Using
    Back to top IDScan.net IDScan.net GitHub