Reputation: 207
I have been having this error:
could not attach to pid
From Xcode for about 3 days now. The weird thing is during the 3 weeks it got me to finish this project I have had no issues with running the project on the simulator, but after I successfully added provisioning profile I have been having this issue.
I have tried all other solutions posted on here and other forums but all don't seem to work for me. I am using Xcode 8.1 and macOS Sierra.
Upvotes: 2
Views: 4803
Reputation: 3655
Worked for me: Finder->Go->Go to the folder copy text below add paste, delete all and install xcode again:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Upvotes: 0
Reputation: 207
After a painstaking research i discovered the whole error started from when the code refused to compile after adding facebook sdk, so i changed the mach-o type to dynamic libraries thats when the code compiled but now refused to attach to emulator so i reveresed my actions and got the normal compile error i was getting before which was a Arch-64 error so i added that architecture to my target and problem solved.
Upvotes: 0
Reputation: 421
Go to XCode, Preferences,.. and click on location Tab.
Go to DerivedData folder and delete all folders in it.
Then try running Xcode again.
Upvotes: 2
Reputation: 11494
Try resetting the content and settings, like this in the menu:
Also, when I have the issue I can usually re-run the app a few times and it works.
Upvotes: 1