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?
Another fix to this problem is to connect your iPhone with your Xcode open while your iPhone is in the homescreen, not in lockscreen or with an app opened.