PSA: A gentle reminder that law enforcement can physically force you to unlock your device using biometrics (fingerprint scan or face scan) but the first amendment protects your passcode. You cannot be compelled to reveal it.
To protect your privacy in an emergency, tap the side button or home button on your iPhone five times to temporarily disable biometrics. Your passcode will then be required on the next unlock attempt. You can practice this right now.
UPDATE: This has changed on the newest iPhone. Now you hold the side button and either volume button down for a few seconds (which is to say: squeeze the phone). This should work on all “notch” style phones.
Note: This does not apply at border crossings where, today at least, you can be refused entry if you refuse to unlock your phone.