The iPhone X's infrared camera is used for its Face ID security, which projects thousands of dots on a user's face to distinguish one from another. It's what the Xbox Kinect does as well.
The technology can map the 3D depth of a face too, so it's a lot more effective than simply superimposing a set of frames on a flat photo of someone.
After the mapping is done, the app recommends you a series of frames it thinks will fit.
At this point, Warby Parker for iOS doesn't actually use the face map to overlay the glasses – it only provides a recommendation.
IF YOU WANT TO LEARN MORE: