Xcode 4 hangs at “Attaching to (app name)”

后端 未结 30 3222
执笔经年
执笔经年 2020-11-28 18:20

I just upgraded to Xcode 4 and for some reason my app won\'t run in the simulator or iOS device. It was working perfectly in Xcode 3, but all of a sudden now when I press ru

相关标签:
30条回答
  • 2020-11-28 18:34

    Fixed it!! Hopefully this helps some people avoid a very frustrating couple hours. I solved this by:

    1. Clicking on the project name in the left pane (at the very top). This will bring up a new menu to the right, something like the project/ target editors in XCode 3.
    2. Click on Build Settings up at the top.
    3. Under Packaging make sure your product name is the same for every build, and equal to whatever it says it's attaching to. Eg if XCode is Hanging at "Attaching to myLCBO" but your product name is "LCBO Finder" then it won't build. That was exactly my problem because I renamed my app half way through development.

    Hope this helps!

    0 讨论(0)
  • 2020-11-28 18:34

    My solution is correcting the nib name. (I changed my nib name before for an iPad version but then I deleted the iPad nib file). Then it works well again.

    0 讨论(0)
  • 2020-11-28 18:35

    A tip I found at the Apple Developer Forums:

    Go into your ProjectName.xcodeproj/ directory and delete anything named with your userid. Re-open the project in xcode and all that will get recreated and it should work. At least it did for me.

    Another tip is to manually delete the build directory.

    Yet another tip is to navigate to the Organizer (Shift ⇧ Command ⌘ 2 in xcode 4), select Projects, select you application in the left hand side and then the Delete...-button to the right of Derived Data.

    And never forget the universally useful tip: restart your computer and try again.

    Good luck!

    0 讨论(0)
  • 2020-11-28 18:35

    One more possible solution: I had my Resources folder added to the project as a folder reference (the blue folder icon). That caused the trouble, after adding the folder as a group the problem went away.

    0 讨论(0)
  • 2020-11-28 18:37

    This also seemed to happen to me when the info.plist file was in the copy build phase. It appears that sometimes Xcode will warn you about this, and other times it won't. Very strange. But if you are experiencing this issue, make sure that info.plist is NOT in your copy build phase.

    0 讨论(0)
  • 2020-11-28 18:39

    Solution provided didn't fix the problem in my case.

    In order to solve it (XCode 4 only), I had to go to Product -> Edit Scheme. Then select the "Run " scheme, and marked "Automatically" which wasn't enabled.

    Hope it helps someone.

    http://tinyurl.com/3ma9xv7

    0 讨论(0)
提交回复
热议问题