Swift Vision face yaw/pitch/roll are non-optional Measurements
@sjsherr12▲ 0 net votes
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.