iPhones also have a near-IR front camera, but that one is fully slaved to the FaceID system. Don't think anything in userland can access raw data from it.
Those rely on the depth maps, which can be accessed from userspace. But the depth maps are derived from IR camera footage, which is not accessible.
Ironically, older iPhones have better depth resolving capability overall. Apple sacrificed depth sensing performance in favor of smaller unit size in the newer ones.