title: Record video from front facing camera during ARKit ARSession on iPhone X
body: <p>I'm using an <code>ARSession</code> combined with an <code>ARFaceTrackingConfiguration</code> to track my face. At the same time, I would like to record a video from the front facing camera of my iPhone X. To do so I'm using <code>AVCaptureSession</code> but as soon as I start recording, the <code>ARSession</code> gets interrupted.</p>
  
  <p>These are two snippets of code:</p>
  
  <pre><code>// Face tracking
  let configuration = ARFaceTrackingConfiguration()
      configuration.isLightEstimationEnabled = false
  let session = ARSession()
  session.run(configuration, options: [.removeExistingAnchors, .resetTracking])
  
  // Video recording
  let camera = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front)!
  input = try! AVCaptureDeviceInput(device: camera)
  session.addInput(input)
  session.addOutput(output)
  </code></pre>
  
  <p>Does anybody know how to do the two things at the same time? Apps like Snapchat allow users to record and use the True Depth sensor at the same time so I imagine what I'm asking is perfectly feasible. Thanks!</p>