Xcode "Device Locked" When iPhone is unlocked

Faisal Syed picture Faisal Syed · Nov 7, 2014 · Viewed 200.9k times · Source

When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it's not locked at all. How do I fix this?

Answer

Abhi Beckert picture Abhi Beckert · Jan 15, 2015

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