title: AVmetadata changes with swift 4 xcode 9
body: <p>So I'm trying to build a very simple QR code app on this new xcode. I've used the same code on swift 3 and it worked just fine. I'm trying to make it happen in swift 4, but I can't seem to find a solution. I get thrown back this error message </p>
  
  <pre><code>2017-09-18 14:41:55.269242-0400 camTest[4401:2234792] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -availableMetadataObjectTypes'
  *** First throw call stack:
  (0x18392bd38 0x182e40528 0x18925e7d8 0x1049d25fc 0x1049d3664 0x18cd3abfc 0x18cd3a7d4 0x18d8c78b0 0x18d07d3b0 0x18d0ad034 0x18d0aff54 0x18d0b0488 0x18d0afea4 0x18ce1a55c 0x18d0b3d60 0x18d4de084 0x18d64b620 0x18d64b4c4 0x18d64b798 0x18cd6f20c 0x18cd6f18c 0x18cd59f4c 0x18cd6ea80 0x18cd6e5a0 0x18cd69a70 0x18cd3b078 0x18d67af98 0x18d67d408 0x18d676574 0x1838d4358 0x1838d42d8 0x1838d3b60 0x1838d1738 0x1837f22d8 0x185683f84 0x18cd9e880 0x1049d5644 0x18331656c)
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>I'm guessing that it's saying that it doesn't support the metadatatype of QR. But I don't of a way to make xcode 9 utilize the QR metadata type.</p>
  
  <p>Here is the super simple code I'm using, Can anyone please help me out</p>
  
  <pre><code>import UIKit
  import AVFoundation
  
  class scannerVC: UIViewController, AVCaptureMetadataOutputObjectsDelegate {
  
  @IBOutlet weak var Square: UIImageView!
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      var video = AVCaptureVideoPreviewLayer()
  
      let session = AVCaptureSession()
  
      let captureDevice = AVCaptureDevice.default(for: AVMediaType.video)
  
      do {
  
          let input = try AVCaptureDeviceInput(device: captureDevice!)
          session.addInput(input)
      } catch {
          print(error)
      }
  
  
      let output = AVCaptureMetadataOutput()
  
      output.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)
  
      output.metadataObjectTypes = [AVMetadataObject.ObjectType.qr]
  
      video = AVCaptureVideoPreviewLayer(session: session)
      video.frame = view.layer.bounds
      view.layer.addSublayer(video)
  
      self.view.bringSubview(toFront: Square)
      session.startRunning()
  
  }
  
  }
  </code></pre>