iOS - Xcode Error: cannot attach to process due to System Integrity Protection

Sazzad Hissain Khan picture Sazzad Hissain Khan · Aug 30, 2016 · Viewed 14.5k times · Source

When I running an application shared extension from XCode run button and then trying to share files, XCode shows the below error frequently. Anyone have any idea whats causing it?

enter image description here

Error: "cannot attach to process due to System Integrity Protection"

Answer

Yash Tamakuwala picture Yash Tamakuwala · Aug 30, 2016

System Integrity Protection(SIP) aka rootless is a new security feature in OS X 10.11. By default it disables even the administrator to access/modify the root. Follow these steps to disable SIP:

  1. Restart your Mac.

  2. Before OS X starts up, hold down Command-R and keep it held down until you see an Apple icon and a progress bar. Release. This boots you into Recovery.

  3. From the Utilities menu, select Terminal.

  4. At the prompt type exactly the following and then press Return:

     csrutil disable
    
  5. Terminal should display a message that SIP was disabled.

  6. From the  menu, select Restart.

You can re-enable SIP by following the above steps, but using csrutil enable instead.