3

iOS 11 has a built in document scanner that you can launch from Notes. I’d like to scan documents for my app, is there a way to present the native document scanner and receive its images?

TruMan1
  • 33,665
  • 59
  • 184
  • 335

1 Answers1

1

This is now available in iOS 13+ and is provided through the VisionKit API.

Present the VNDocumentCameraViewController view controller, registering the VNDocumentCameraViewControllerDelegate delegate:

let documentCameraViewController = VNDocumentCameraViewController()
documentCameraViewController.delegate = self
present(documentCameraViewController, animated: true)

Then receive the delegate calls once a document has been successfully captured by the user:

documentCameraViewController(_ controller: VNDocumentCameraViewController, 
                       didFinishWith scan: VNDocumentCameraScan)
jt_uk
  • 1,362
  • 1
  • 15
  • 17