Xcode "Device Locked" When iPhone is unlocked
My phone was set to "trust" the Mac, and I still ran into this error with Xcode 6.1.1.
This worked for me:
- unplug device
- quit xcode
- open xcode
- plug in device
- build/run
Did you by chance not "trust" the device? This will prevent it from communicating with xcode even if the device is unlocked.
Update here's a support doc from Apple: http://support.apple.com/en-us/HT5868