# ARSCNView device

**URL:** <https://forums.kodeco.com/t/arscnview-device/45054>\
**Category:** ARKit by Tutorials\
**Created:** [July 24, 2018, 8:36pm UTC](https://forums.kodeco.com/t/arscnview-device/45054 "2018-07-24T20:36:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![redqueencoder](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/redqueencoder/32/76579_2.png) [@redqueencoder](https://forums.kodeco.com/u/redqueencoder)\
**Post date:** [July 24, 2018, 8:36pm UTC](https://forums.kodeco.com/t/arscnview-device/45054/1 "2018-07-24T20:36:50Z")

</div>

On page 300 in chapter 15 the user is instructed to add the following method:

```auto
func createFaceGeometry() {
    updateMessage(text: "Creating face geometry.")

    let device = sceneView.device!

    let maskGeometry = ARSCNFaceGeometry(device: device)!
    mask = Mask(geometry: maskGeometry, maskType: maskType)
}

```

There is an error on the `let device` line indicating that ARSCNView has no member named `device`. I checked the final version of the project and that one also does not build because of the same issue.

I am on Xcode 9.4. Thanks.

Janie

---

<div class="post-metadata">

**Author:** ![redqueencoder](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/redqueencoder/32/76579_2.png) [@redqueencoder](https://forums.kodeco.com/u/redqueencoder)\
**Post date:** [July 24, 2018, 9:06pm UTC](https://forums.kodeco.com/t/arscnview-device/45054/2 "2018-07-24T21:06:40Z")

</div>

I looked into this error. This code also broke in a piece of Apple’s sample code. I believe the device they are referring to is the Metal system device, so I resolve this by replacing that code with:

```auto
func createFaceGeometry() {
        updateMessage(text: "Creating face geometry.")
        
        let device = MTLCreateSystemDefaultDevice()
        
        let maskGeometry = ARSCNFaceGeometry(device: device!)!
        mask = Mask(geometry: maskGeometry)
}

```

Please pardon the double bangs. This could be written more safely, but at least wanted to give a starting point to anyone else encountering this error while working through the book.

Janie

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [July 24, 2018, 9:53pm UTC](https://forums.kodeco.com/t/arscnview-device/45054/3 "2018-07-24T21:53:09Z")

</div>

Hi @redqueencoder, thank you for looking into the error and providing us with an update. Glad you were able to resolve the issue.

Best,  
Gina
