Xcode stuck while building your iPhone app?
Just got a weird error after my provisioning profile expired and I updated my provisioning profiles and certificates (since I changed my account over from my personal name to the company's name, I was going to anyway) where Xcode got stuck in the Building... stage.
The workaround was to unplug my device which made a dialog box pop up asking me for permission to use my keychain. The dialog box wasn't there before I unplugged the device. (I'm not sure if this has anything to do with using a wildcard in your bundle identifier and shared keychain items or not.) Clicking "Always Allow" fixed the issue and it hasn't returned since.