Starting with iOS 11.4.1, if you use USB accessories with your iPhone, iPad or iPod touch, or if you connect your device to a Mac or PC, you may need to unlock your device for it to recognise and use the accessory. Your accessory will then remain connected, even if your device is subsequently locked.
If you don’t unlock your password-protected iOS device first — or you haven’t unlocked and connected it to a USB accessory within the past hour — your iOS device won’t communicate with the accessory or computer, and in some cases it may not charge. You may also see an alert asking you to unlock your device to use accessories.
If the USB accessory is still not recognised after you've unlocked your device, disconnect your device from the accessory, unlock your device and then reconnect the accessory.
Your iPhone, iPad or iPod touch charges as usual when it’s connected to a USB power adaptor.
Allow access to USB accessories
You can allow your iOS device to always access USB accessories, for example, if you use a USB assistive device to enter your passcode on your locked iPhone. Many assistive devices will automatically turn on the setting to allow USB devices the first time they’re connected.
If you don’t connect to USB accessories regularly, you may need to turn on this setting manually.
In Settings, go to Face ID & Passcode or Touch ID & Passcode, and turn on USB Accessories under Allow Access When Locked.
When the USB Accessories setting is off, as in the image above, you may need to unlock your iOS device to connect USB accessories.
Administrators can control the USB Accessories setting on supervised iOS devices using Apple Configurator or mobile device management.