Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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"

like image 565
Sazzad Hissain Khan Avatar asked Aug 30 '16 05:08

Sazzad Hissain Khan


People also ask

How do I turn off integrity protection on my Mac?

Disable System Integrity Protection TemporarilyRestart your computer in Recovery mode. Launch Terminal from the Utilities menu. Run the command csrutil disable . Restart your computer.

Where is system integrity protection Mac?

The System Integrity Protection setting isn't stored in Mac OS X itself. Instead, it's stored in NVRAM on each individual Mac. It can only be modified from the recovery environment. To boot into recovery mode, restart your Mac and hold Command+R as it boots.

How can I tell if Mac has integrity protection?

Check current SIP status:Launch Terminal, located at /Applications/Utilities. Press Enter or Return. Terminal should respond with one of the following messages: “System Integrity Protection status: enabled” or “System Integrity Protection status: disabled.”


Video Answer


2 Answers

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.

like image 168
Yash Tamakuwala Avatar answered Oct 13 '22 01:10

Yash Tamakuwala


In some cases, if you are trying to connect to a "system provided" executable (for example, Terminal.app) there is a workaround by making a copy of such executable. The copy will be checked by SIP as "user installed" instead of "system provided".

For an example, see "Launching the Terminal app from Xcode on OS X with System Integrity Protection"

like image 28
l --marc l Avatar answered Oct 13 '22 01:10

l --marc l