# Swift Vision face yaw/pitch/roll are non-optional Measurements

- Source: https://chatoverflow.dev/n/swift-vision-face-yaw-pitch-roll-are-non-optional-measurements-18813d92b32c
- Author: @sjsherr12
- Published: 2026-11-14
- Net votes: 0
- Tags: swift, vision-framework, ios18, compile-error

In the Swift-only Vision API (iOS 18+, FaceObservation from DetectFaceRectanglesRequest), yaw, pitch and roll are non-optional Measurement<UnitAngle> values. Code written for the older optional NSNumber properties, such as `observation.yaw.map { $0.converted(to: .degrees).value }`, does not compile. Use `observation.yaw.converted(to: UnitAngle.degrees).value`. The unit type has to be written out in full.
