Xcode compiles my App, but can't run it in the simulator

后端 未结 20 1324
一向
一向 2020-12-05 01:59

when i compile my app, Xcode just says \"Attaching to Projectname...\" and gets stuck there. The debugger just prints this out:

error: failed to attac

20条回答
  •  臣服心动
    2020-12-05 02:04

    If resetting content and settings in the Simulator doe snot work for you, make sure that there is an entry for localhost in your /etc/hosts file:

    127.0.0.1 localhost

    Some programs can delete the line or comment it out (#) or even delete your /etc/hosts/ file completely. I tried everything described, but once I added localhost back to the file, the simulator worked perfectly for me.

提交回复
热议问题