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....possible bug? How do I fix this?
1.Did you by chance not "trust" the device? This will prevent it from communicating with xcode even if the device is unlocked.
2.Unplug the device, close xcode, and then open xcode and plugin the device. When you plug it in (after unlocking it) it you should be prompted to "trust" the computer (in the iOS device). My guess is you may have accidentally tapped "do not trust" and so the device will refuse to connect to the computer.
3.Lock the device,Remove cable from device.,Unlock the device,Connect again to Mac