title: swift 3 asking permission while using camera
body: <p>I have read many of articles regarding on this issues that only adds lines of code on plist like:</p>
  
  <pre><code>Key     :  Privacy - Camera Usage Description   
  Value   :  $(PRODUCT_NAME) camera use
  </code></pre>
  
  <p>but i still got the same issue that </p>
  
  <p>ERROR MESSAGE </p>
  
  <blockquote>
    <p>'Attempted to start scanning on a device with no camera. Check requestCameraPermissionWithSuccess: method before calling
    startScanningWithResultBlock:'</p>
  </blockquote>
  
  <p>It seems like it still do not have the permission on using the camera on the apps</p>
  
  <p>but then actually how are we going to gain camera access on iOS device?</p>
  
  <p>and this are my code</p>
  
  <pre><code>    MTBBarcodeScanner.requestCameraPermission(success: { success in
          if success {
              do {
                  try self.scanner?.startScanning(resultBlock: { codes in
                      if let codes = codes {
                          for code in codes {
                              let stringValue = code.stringValue!
                              print("Found code: \(stringValue)")
  
                              if (stringValue != nil)
                              { ... }
  
                                      })
                                  }))
                                  self.present(alert, animated: true, completion: nil)
                              }
                          }
                      }
                  })
              } catch {
                  NSLog("Unable to start scanning")
              }
          } else {
              UIAlertView(title: "Scanning Unavailable", message: "This app does not have permission to access the camera", delegate: nil, cancelButtonTitle: nil, otherButtonTitles: "Ok").show()
          }
      })
  </code></pre>