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

后端 未结 30 3221
执笔经年
执笔经年 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:45

    I had the same problem. The issue was there was one more user who was logged in and had the simulator running. Think there can be only one instance of iphone simulator running on a machine even for different users. Hope this info would be useful for somebody :)

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

    I frequently encountered this problem after renaming a project in Xcode 4.

    I was able to fix it by editing the Bundle Identifier in the .plist file.

    After I renamed the project, the Bundle Identifier would change to something like this:

    com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
    

    changing it back to this:

    com.yourcompany.${PRODUCT_NAME}
    

    will stop Xcode from hanging and allow the App to run.

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

    Like Rob said, but also check the "identifier" should read by default "com.yourcompany.YourAppName" I had changed the "yourcompany" by mistake and this caused the same issue noted above.

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

    What worked for me is the following:

    In XCode:

    • Click on project name
    • Click on target name
    • Click on "Build Settings"
    • Reveal "Product Name" contents (click on triangle)
    • Make sure the name of all items matches that of project name
      • Example
        • Product Name myapp
          • Debug myapp
          • Release myapp
    • Reveal "Deployment" contents (click on triangle)
    • Make sure there is a "IOS Deployment Target" item
      • Example
        • IOS Deployment Target IOS 3.0
          • Debug IOS 3.0
          • Release IOS 3.0

    Then clean and run.

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

    Here was our fix:

    In Project > Edit Schemes > Run.

    Change the Debugger from GDB to None (directly above the green circle in the image above).

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

    I tried everything and nothing worked. I have an old project from XCode 3. I simply renamed info.plist in the project to another name, restarted the simulator and everything is working fine since.

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