Apple has just released iOS 11.4.1, and it includes USB Restricted Mode, a feature that was part of the 11.4.1 and iOS 12 betas. Restricted mode was created to protect iPhones against USB devices used by law enforcement to crack your passcode and get around encryption. It disables USB access after the phone has been locked for an hour, instead of a week as was previously the rule. To see the new mode toggle, drop into your Settings app and look under Touch ID (or Face ID if you have an iPhone X). There will be a new toggle button for USB Accessories there. Access is already disabled by default, so toggling it on with a tap will allow access for USB accessories.