Xcode 9: Could not attach to pid

前端 未结 22 2159
旧巷少年郎
旧巷少年郎 2020-12-13 05:41

I\'ve been facing an issue (frequently) with the recent major release of the iOS application development tool - Xcode 9-beta.

It\'s showing me the following error fr

相关标签:
22条回答
  • 2020-12-13 06:06

    I was seeing this in Xcode 10.2 and the cause for me was that lldb-rpc-server was crashing. I worked around it by ensuring either Address Sanitizer or Thread Sanitizer is enabled in the debug options. I also filed a bug report viewable on Open Radar.

    0 讨论(0)
  • 2020-12-13 06:07

    This is the issue with the untrusted certificates in key-chain access, please remove such a type of certificates and re-build again.

    0 讨论(0)
  • 2020-12-13 06:08

    Even on Xcode 11.1/2/3

    It is an Authorization issue with Simulator, When Simulator does not have the necessary access. It raises the issue.

    Try following in Terminal

    sudo DevToolsSecurity -enable

    or

    sudo /usr/sbin/DevToolsSecurity -enable

    Details can be found here

    0 讨论(0)
  • 2020-12-13 06:10

    I had same issue. Check screenshot.

    Below are few solutions that should work:

    1. Rerun project
    2. Clean (Shortcut: cmd + shift + K) and Rerun project
    3. Quit Xcode and Simulator. Open project and run again
    4. Reset content of Simulator (Select Simulator -> Goto Hardware tab -> Erase All Content and Settings…) and rerun project.

    Solution 4 worked for me.

    0 讨论(0)
  • 2020-12-13 06:10

    I realise this is not a problem with a single solution, from all the other answers. So, here's what worked for me:

    1) Reboot the machine

    2) The first run always works for me. The only thing that helps me avoid this error after this first run, is to stop the application from XCode, instead of just clicking the Run button to re-run the application.

    Another thing, when I lock my computer the issue re-appears sometimes (probably when I forget to stop the application). So I have to reboot my machine again.

    0 讨论(0)
  • 2020-12-13 06:17

    I have been dealing with this issue for days. I have been able to build but not launch on Simulator, and I get the same "pid:.." error message.

    I am using: - Xcode v9.2 - Swift 3.2 - Building for iOS

    The things that I tried that DID NOT WORK were:

    restarting the computer; deleting content and settings (of Simulator, I do not have "reset"); uninstalling and reinstalling Xcode; changing "Deployment Target"; changing the device in the simulator's Hardware->Manage Device; deleting Derived Data, Cleaning and Building, or just waiting...forever.

    What WORKED was as @Rajasekhar mentioned:

    • checked out the Keychain certificates.
    • deleted the exiting ones by right clicking (they'd passed expiration)
    • and unchecked "automatically manage signing" in Targets->General

    After that it successfully launched in Simulator. I don't know if the issue will come back but hopefully this works.

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