It has often been rumored that the iPhone 8 will ship with a front-facing 3D sensor to replace the Touch ID button, which would bring facial recognition to Apple's next flagship handset. However, that is not the only thing the 3D sensor could be used for. While digging around some source code, a Twitter user found lines of text suggesting that the iPhone 8 will silence notifications when peering at the OLED display.
Silencing notifications would be a subtle feature upgrade, but also one that makes a lot of sense if and when the technology is available. It is an example of the kinds of doors having a 3D sensor with facial recognition technology can open. Whether or not it comes to fruition remains to be seen—beyond having the technology, it also needs to work consistently and reliably for Apple to implement it.
Brazilian programmer and iOS developer Guilherme Rambo discovered the string of text suggesting silenced notifications in the HomePod compiled source code. One thing to keep in mind that the code's existence does not automatically mean Apple will implement it. Apple often experiments with new features during the testing phase, which either get polished and included in final code or ultimately pulled, depending on how it works out.
That said, finding the code this late to launch is a good sign. What it entails is using the depth sensing capabilities of the iPhone 8's front cameras to suppress notification sounds. The assumption there is that if you're looking at the display, you will see any incoming notifications, making auditory alerts redundant. If we had to guess, this would be an optional feature that Apple would let users turn on or off.
There have been a lot of leaks related to the iPhone 8. In addition to having a 3D sensor and OLED display, it's rumored the iPhone 8 will finally support wireless charging, a feature that has been available to many Android handsets for a long time now. The iPhone 8 might also support 4K video recording at 60 frames per second with both the front and rear cameras.