Reputation: 693
I just downloaded and installed xcode4 with the latest SDK. I opened my project selected run and the simulator pulls up but stays black. All I see in the status window of XCode is 'Attaching to MyProjectName
Upvotes: 3
Views: 5559
Reputation: 41
What did the trick for me is:
Upvotes: 0
Reputation: 2613
There are a lot of different solutions people suggest for this:
I just spent an hour trying different combinations of the items above, doing all of them, ... nothing worked. My app would either 1) Immediately start and quit before launch screen would show up, or 2) Hang at launch screen. The simulator took forever to reset, sometimes wouldn't respond to a Quit, ... Just really odd stuff going on.
This solved my problem: Reboot machine.
(It blows my mind this had to be done on Mac OS, but it worked. This may have something to do with upgrading to XCode 4.6 and not rebooting since then, I'm not sure... But I'm back running again)
Upvotes: 1
Reputation: 256
check out my blog post for how to get around this -- basically you need to delete your xcuserdata for the project. http://hiediutley.com/2011/03/10/xcode4-is-your-old-project-hanging-in-the-simulator/
Upvotes: 10
Reputation: 15001
I've been struggling with this same problem for half a day! Finally I managed to solve my issue.
My applications plist file had been heavily modified, so I created a new application and compared my plist values to the new one. My plist file had a hard coded string set for the Executable file
value, changing this solved my issue.
ApplicationName-Info.plist
fileExecutable file
is set to ${EXECUTABLE_NAME}
I'm not sure why I had to Clean, Build, Run twice, but it failed to launch the first time.
Hopefully this works for you. Try changing some of the other values back to their defaults if this doesn't work as it may still be an issue with your plist file.
Upvotes: 1