The iPhone X introduced the world to Face ID in 2017, and now, every new iPhone uses Apple's biometric security system instead of the old Touch ID. It's more secure than fingerprint scanners and it's even more user-friendly. True, it's not without its faults, but at least one of the biggest problems can be fixed.
Face ID is powered by 30,000 infrared dot scanners that map out your face in 3D. But these scanners can't always see through sunglasses, depending on the type of lens, which means Face ID can fail if you're wearing shades. If you currently have a pair of sunglasses giving you trouble unlocking your device, you'll be happy to know that there's a quick fix to your problem.
The reason why Touch ID doesn't unlock your iPhone when you're wearing certain sunglasses is because of the TrueDepth camera's infrared sensors. Although they can penetrate most sunglasses, the IR sensors cannot get past certain shades to see if your eyes are open or closed (my Ray-Ban Wayfarer sunglasses don't work with Face ID).
Face ID's attention awareness feature prevents your iPhone from unlocking until it detects that your eyes are open and looking at it. Luckily, this feature can easily be disabled to allow you to unlock your phone even with sunglasses that block IR.
In your Settings go to "Face ID & Passcode," enter your passcode, and scroll down until you see "Require Attention for Face ID." Disable this feature, and you'll now be able to unlock your iPhone with any pair of sunglasses on.
However, disabling this feature does make Face ID less secure. If "Require Attention for Face ID" is off, someone could potentially unlock your phone while you are sleeping or passed out, but the same can be said about Touch ID. When you disable the feature, iOS lets you know that the requiring attention feature makes Face ID more secure, so just be aware of the risks.
Face ID uses machine learning to continuously familiarize itself with your appearance. For instance, if you're squinting while trying to unlock your device and it doesn't work, as long as you immediately enter your passcode, Face ID registers the changes in your face for next time, allowing you to unlock your device successfully with a squinting face.
If you're someone who wants "Require Attention for Face ID" enabled for security purposes, could you teach Face ID to learn how to unlock your device with sunglasses that block IR? Unfortunately, no. Even after a dozen tries, I wasn't able to teach Face ID to learn my face with my Ray-Ban sunglasses on.
Another teaching method I attempted was setting up an alternate appearance. If you use work goggles or change up your facial hair often, this feature is useful, but does it work with sunglasses that block IR? Again, the answer is no. As soon as I tapped on "Set Up an Alternate Appearance," Face ID told me my face was obstructed and that I would need to remove my sunglasses to proceed.
Sadly, there is no way to use Face ID with sunglasses that block IR without disabling "Require Attention for Face ID." If you're not okay with turning off this security feature, your only other option is to get yourself a new pair of sunglasses that don't block IR.