Apple's TrueDepth camera on iPhone X uses infrared sensors that capture light in the wavelength range of 800nm to 1300nm to achieve pattern-based depth mapping, allowing it to work day or night, like devices used for medical diagnosis, food inspection and night vision.
Apple awarded crucial patent for TrueDepth camera’s 4-element infrared optics