Xcode 9 - Could not attach to pid for Frameworks unit tests

前端 未结 6 571
Happy的楠姐
Happy的楠姐 2021-02-02 15:22

I am getting the following error after migrating from one mac to another using time machine.

Could not attach to pid

Ensure "project title"

相关标签:
6条回答
  • 2021-02-02 16:00

    You can try some following steps -

    1. Open the keyChain and check the Keychain certificates and delete the existing ones which are expired.
      1. Uncheck the - automatically manage sign in from Xcode project settings.
      2. Delete any derived data
      3. Clean the project by cmd+k
      4. Then Close and Restart the project and Run...

    I hope it will work.

    0 讨论(0)
  • 2021-02-02 16:03

    You can do this following steps -

    1. Kill your simulator and then run it again from Xcode.

    2. If you are trying to build too fast after a build has started. Try stopping and running the project again.

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

    Finally, you can do is recheck the Keychain certificates. Delete the exiting ones by right clicking (they'd passed expiration) and unchecked "automatically manage signing" in Targets->General

    Hope above steps will solve your problem.

    0 讨论(0)
  • 2021-02-02 16:06

    After opening a bug report to Apple, they suggested me to:

    • Check if my user is an Admin user. It was the case.
    • Check if I have "_developer" group, in the output of groups command. it was the case. Use this command: dscacheutil -q group
    • Check developer mode rights using the command sudo /usr/sbin/DevToolsSecurity -status. The status was unknown for me.
    • Enable developer mode rights if needed, using the command sudo /usr/sbin/DevToolsSecurity -enable. This solved finally my issue!
    0 讨论(0)
  • 2021-02-02 16:19

    Haven't seen this exact error, but I've found removing the derived data helps fix some transient errors that pop up after updates etc.

    You can find the location of your derived data folder in Xcode.
    Open preferences/locations and click the arrow.
    Once in derived data you can remove all the folders. FYI after deleting the derived data folder all your projects will need to be rebuilt.

    Hope this helps!

    0 讨论(0)
  • 2021-02-02 16:26

    If you have Mojave OS then:

    1) Open your target scheme

    2) Uncheck this one

    3) Select this scheme while testing this target (ex. Testing "TestApiTarget" - select "TestApiTarget" in schemes on tests).

    Its temporary solution from bug report

    0 讨论(0)
  • 2021-02-02 16:26

    I was able to resolve this issue by:

    1. adding Single View App target (I named it HostApp)
    2. setting HostApp target as a host application for test target

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