MacOS – Xcode Helper does not have the accessibility permissions needed to run tests

accessibilitymacosxcode

I am getting this error when attempting to run some accessibility UTs on a project. I was under the impression that a prompt such as this would appear:

enter image description here

However, I am not seeing this prompt. I also tried to go to "Security & Privacy > Accessibility" to give the app "Xcode helper" the proper permissions, but I cannot find "Xcode helper" anywhere on my computer… only Xcode. I added Xcode but am still hitting this error. Ideas? Where can I find "Xcode helper"?

Best Answer

Where can I find "Xcode helper"?

The Xcode Helper app is located inside the Xcode bundle:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/Xcode Helper

To get rid of the error message:

  1. Open System Preferences.
  2. Select Security & Privacy>Privacy>Accessibility. Unlock the panel, if necessary.
  3. Press the "+" button, navigate to: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents

add the Xcode Helper app and press Open:

enter image description here

  1. Enable it:

enter image description here