Xcode 9 - Could not attach to pid for Frameworks unit tests
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!
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