Putting iPhone passcode into Xcode, so I wouldn't need to unlock my iPhone for every build? Is there a way that I could put my iPhone lock code into Xcode, so I wouldn't need to unlock my iPhone for every build?

It gets really frustrating that I need to physically unlock my iPhone before every build.

I know for developing on android they allow you to put the device in dev mode, which restricts the device from sleeping.
Could everyone please report this as a bug?

As it stands, you either put up with it, or much worse, turn off locking. Neither option is good.

If the iOS device is in developer mode, and connected to an active Xcode instance, Xcode should be able to keep the phone unlocked.

That way you not only can leave locking on, but it will re-lock the instant you disconnect.