I'm learning XPC by inspecting the GitHub Copilot project. I figured out that the schema works as follows:
- The host app with a UI to manage settings
- A Service Extension that controls the Xcode Editor
- A communication bridge cli app that connects the first two
As far as I understand an app appears in the Accessibility Permission
when it calls the next method:
let key = kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString AXIsProcessTrustedWithOptions([key: true] as CFDictionary)
This method is only called by the Service Extension.
However, when I run a release build from the /Application
folder (where launch agents point to), there are two records appearing in the Accessibility Permission
list:
- The host app
- The needed Service Extension
I compared all metadata files from Copilot with my copy line-by-line, but still can't figure out why the host app record appears in the Accessibility Permission
, since the host app does not call the AXIsProcessTrustedWithOptions()
method at all.
Could you give me any clue to help me wrap my head around it?