Video Depth Maps Tutorial for iOS: Getting Started |

In this iOS video depth maps tutorial, you’ll harness iOS 13’s video depth maps to apply realtime video filters and create a special effects masterpiece!

This is a companion discussion topic for the original entry at
1 Like

Hi, trying to run the final version on Iphone 11 ios13.1.1, the
AVCaptureDevice.default(.builtInDualCamera - throws error, can not get the AVCaptureDevice with that camera.
When changed to builtInWideAngleCamera, the app runs, but no depth can be achieved, only original image.

@owenb Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi async1,
Sorry, I don’t have an iPhone 11 to test with, but what happens if you specify .back for position with .builtInDualCamera?

Also, what is the error?

Hi Owen, thanks for your quick reply.
It is fixed. It turns out on iPhone 11 there’s only a .builtInDualWideCamera - as a default set of cameras for Depth. Hope this answer might help somebody in the future.

1 Like

As a side note: using the front facing camera with Xcode 11.2 and swift 5, the following code will work.
guard let camera = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInTrueDepthCamera, for:, position: AVCaptureDevice.Position.front) else {

fatalError(“No depth video camera available”)

@owenb Do you have any feedback about this? Thank you - much appreciated! :]

Hey @darsenaultdotdecimal, thanks for the input!

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!