While your iPhone is locked, you may see a message that says “Unlock your iPhone to use accessories.” This is a security feature added when iOS 11.4.1 works when you connect a USB (Lightning cable) to a device such as a pc with an iPhone that lasts more than an hour. This is to prevent data from leaking from a lost iPhone.
However, charging devices such as mobile batteries and USB AC adapters are excluded from this message. The reason is this specification that even if you connect a Lightning cable to charge your iPhone immediately after waking up, you are not warned that “to use accessories…”
The iPhone’s “Settings” app has an item called “Face ID-Touch ID” and “Passcode”, and when you open it, you’ll find a switch called “USB Accessory”. This switch is linked to a warning message that says “To use an accessory…” and is set to off (white) at the initial value. Off is a higher level of security.
This USB accessory switch is a good way to prepare for a data breach, but it can be annoying. I’m troublesome to receive a warning every time I try to take a photo taken with my pc, i’m not convinced that the message appears even when the purpose of connecting to the pc is charging, if you want to turn on “USB accessory” (green). Although security is slightly reduced, you won’t see a warning message every time you connect to your computer.
“USB accessory” warning that frequently appears during the lock