Revealed in a tweet by developer Steve Troughton-Smith, the code features references to "face detection" and "infrared capture" with respect to a companion iPhone device.
A potential "attention detection" feature is also mentioned in the code, with some speculating that may mean the phone will remain silent for notifications if it knows you're looking at the screen already. It shows what appears to be a almost bezel-free iPhone with a cut-out intruding into the top of the screen from an earphone and camera (and, presumably, the sensors required for all of the aforementioned facial detection).
While Apple has yet to confirm the details about iPhone 8, which is reportedly slated to come out this fall, Estes noted that the rumors about forthcoming iPhones have generally proved to be true in the past. CAD drawings, 3D renders, and protective case designs have shown the same purported iPhone 8 design over and over. That alone, he said, is proof that Apple is indeed planning a facial-recognition feature in its upcoming handset. This feature allows users to wake their device up by simply tapping the display.
The developers, among others have been tearing apart the code in the HomePod, a new speaker system announced by Apple early last month.
Going by the rumors, leaks, and revelations that have been surfacing lately, Apple is more or less confirmed to ditch its traditional Touch ID home button. The only major bezel on the phone is a notch at the top, which will likely contain the phone's front-facing camera, sensors, and speaker for phone calls. The leak does, however, suggest that Apple plans to include the feature either way.