Apple has added some security features in iOS 12. One of them is USB Accessories, which restricts the use of USB Accessories when your iPhone hasn’t been unlocked for one hour. So if you haven’t unlocked the iDevice for more than an hour and are trying to connect to a computer, it will ask you to unlock the iPhone. After opening the iOS device, when you connect your iPhone using a lightning cable to a Mac or Windows PC only you can access USB data.
There are several problems you have to face to increase the security of your iPhone.
iTunes Problems?
Once you disable USB Accessories, you can’t sync iTunes without entering the passcode of your iPhone if your iPhone is locked for more than one hour.
Charging Problems?
If you are habituated to putting your iOS device in charge anywhere, like in a Car or Charging accessories, then your experience will be interrupted by this security feature. Thankfully, there is no need to unlock the iPhone when charging using Apple’s USB charging adapter.
How to access USB data on iPhone: Enable/ Disable USB accessories Access in iPhone
1. Launch the “Settings” from the home screen of the iPhone.
2. If you have a Face ID iPhone, then tap on “Face ID & Passcode,” and for Touch ID iPhone/iPad, tap “Touch ID & Passcode”.
3. Enter your passcode Scroll down, turn off, and you will see “Accessories/USB Accessories”.
When Turn On: You can connect USB Accessories any time you want.
When Turn Off: You can’t connect USB Accessories when your iPhone/iPad is locked for over an hour.
Sometimes, it may be possible that the USB Accessory isn’t recognized by the device even after unlocking it. In that case, you should disconnect and reconnect the accessory from the iPhone.
Unfortunately, if your iPhone is stolen, then there is no chance that any hacking tool can collect the data stored in your device without unlocking it.