ARKitFaceExample compiling error

hi, it says "Value of type 'ARSCNView' has no member 'device' " at line 85 of ViewController.swift.

What could be the reason? Thanks!

(I'm running with iPhone X simulator)

I am getting the same issue.


It does say "// This relies on the earlier check of `ARFaceTrackingConfiguration.isSupported`." Is that the issue ?


I wanted to share my voice that I am experiecing the same issue with this project, including when testing on Xcode 9.1 Beta. While I understand that we will be unable to properly test this project without having iPhone X present, the error leads me to believe that this will not compile on a real device, either. Has anyone been able to successfully run this project at least to a simulator, even though it may crash without a hardware camera?

It runs fine on my iPhone 6s [of course it shows a screen that says the device is not supported, but it still compiles and runs without any problems.]

And yes, it still doesn't run on any of the simulators I've tried, including iPhone X simulator.


I assume this means it will run on iPhone X too when we get our hand on in 4 weeks 😍

I replaced the line:


let device = sceneView.device!


with:


var device: MTLDevice!
device = MTLCreateSystemDefaultDevice()


.. which lets it compile, and run on the iPhone X simulator, but that's still not helpful, as it defaults to the:


"ARKit face tracking requires a device with a TrueDepth front-facing camera .."

I have the same problem, SOMETIMES!

Note:

  1. ARSCNView does NOT have a property "device"
    • So it should NEVER compile
    • But it does, SOMETIMES
  2. Replacing it with the line:
    let device = MTLCreateSystemDefaultDevice()

    Seems to work consistently

  3. I am running on an X

You guys need an iPhone x to deploy it!

The simulator cannot simulate a truedepth camera.

thanks for the code! This worked!

  1. var device: MTLDevice!
  2. device = MTLCreateSystemDefaultDevice()
ARKitFaceExample compiling error
 
 
Q