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?
Asked
Active
Viewed 526 times
3
-
Nothing public. Possibly try poking at alternative values for `UIImagePickerController.CameraCaptureMode` ā Warren Burton Oct 28 '18 at 12:49
-
Unfortunately only `.photo` and `.video` are the available modes. ā TruMan1 Oct 28 '18 at 13:42
1 Answers
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