I run a Mac OSX 10.7 and an Xcode 4.2.1, everything was fine until a few hours ago when my xcode suddenly hangs when i try to run the simulator! This is what Happens

1. The code builds successfully but it indefinitely says "Attaching to AppName"
2. Also, when i try to put it on a device it says "Valid signature not found"
3. Sometimes it allows me to archive the app, and when i do download it onto my device (via Test Flight) the app does not get installed on the device!

These are all the things I've tried (with no success!)

1. restart xcode and/or restart simulator (reset content and settings) and/or restart computer.
2. click on project name in project navigator. in build settings tab, go to packaging and make sure that "Product Name" is the same that the one xcode says simulator is attaching to when running. if they are different, it will fail.
3. go to your projectname.xcodeproj folder. inside there delete anything named with your userid. when you reopen xcode those files will be recreated and it should work…
4. Manually delete the build directory for your project.
5. Go to organizer window. select Projects, select your app in the left hand side and then delete over "Derived Data"
6. Check Launch option is set to "Automatically" in Product->Edit Scheme, "Run" scheme.
7. In Project->"Edit Schemes"->Run. Change the Debugger from GDB to None (this doesn't make sense to me..).
8. Kill the process gdb-i386-apple-darwin from Activity Monitor. this is assuming gdb is not responding.
9. In "Product"->Edit Scheme. in Run, click yourappname.app, choose other, navigate to your .app in your project. now run.
10. Check that you don't have two different Info.plist in your project. if you do, remove the bad one.

Also, I use Git for Version control, and I've been doing so for a month now without any problems! I dunno if this might actually cause a problem (in terms of how xcode manages its resources!) but im just giving out all the information I can, in hope that I can find a fix for this! Any help will be greatly appreciated!