The layout
The split is deliberate: a change to the analyzer can be tested with
swift test in seconds rather than by launching a GUI.
The whole analysis half of Core has no UI dependency at all. Three files under
Monitoring/ do import AppKit behind #if canImport(AppKit) — DynamicMonitor
launches the inspected bundle via NSWorkspace, LiveProbeMonitor polls
NSPasteboard.general.changeCount, and VMHostDetection drives the VM
front-ends. Those are on the dynamic path and can’t do their jobs without it.
If you’re adding a detector under Analysis/, keep it free of both.
There is a second, stale copy of the helper sources under
Sources/privacycommandHelper/. The Xcode project builds the top-level
privacycommandHelper directory — that’s the one that ships. Check which you
are editing.Where to start
- A new detector — Contributing has the contract, including the Knowledge Base entry that has to come with it.
- How the pieces fit — Architecture.
- VM mode internals — Guest agent.
- Getting it building — Build from source.