Security Policies
Make sure there are no security policies:
From a Home screen, navigate: Settings
Then General
Then Device Management
Remove any policies listed.
Passcode / PIN
Make sure your device is not protected with passcode:
From a Home screen, navigate: Settings. > Face ID & Passcode.
Enter your passcode then tap Turn Passcode Off
Autolock
Make sure your device will not lock:
From a Home screen, navigate: Settings
Then Display & Brightness
Auto-Lock. Set Auto-Lock to "Never".
Locked Access
Allow locked device to get unlocked:
From a Home screen, navigate: Settings
Find Face ID & Passcode (or Touch ID & Passcode depending on your model).
Enter your passcode
Scroll to the bottom of the page
Find the USB Accessories toggle under "Allow access when locked" and enable.