title: iOS App Crashing in VisionKit framework iOS 13
body: <p>I am using VisionKit framework for document capture introduced in iOS 13. It's wonderfull framework for capturing document. But in this framework at one point there are two buttons on navigation bar <strong>(Retake and Done)</strong> on navigation bar. When I click on those app is getting Crashed with below reason:-</p>
  
  <p><strong>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.'</strong></p>
  
  <p>I have tried to do this by returning preferredStatusBarUpdateAnimation to false. But it didn't resolve.</p>
  
  <p>Here is code snippet:-</p>
  
  <pre><code>import UIKit
  import VisionKit
  
  class DetectDocumentViewController: UIViewController, VNDocumentCameraViewControllerDelegate {
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
      }
  
      @IBAction func tapMeAction(_ sender: UIButton) {
          let vc = VNDocumentCameraViewController()
          vc.delegate = self
          present(vc, animated: true)
      }
  
      func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan) {
          print("Found \(scan.pageCount)")
  
          for i in 0 ..&lt; scan.pageCount {
              let img = scan.imageOfPage(at: i)
              print(img)
              // ... your code here
          }
          controller.dismiss(animated: true, completion: nil)
      }
  
      func documentCameraViewControllerDidCancel(_ controller: VNDocumentCameraViewController) {
          controller.dismiss(animated: true)
      }
  
      func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFailWithError error: Error) {
          print(error)
          controller.dismiss(animated: true)
      }
  }
  </code></pre>
  
  <p>Is there any way to resolve this issue to prevent it from Crash?</p>