How gpgtools/libmacgpg works
Project type and purpose
• This is an Objective-C framework project (“Libmacgpg”) that abstracts and simplifies communication with GnuPG on macOS.
• It provides:
• A shared framework (Libmacgpg.framework)
• An XPC helper service (org.gpgtools.Libmacgpg.xpc)
• Two sample macOS GUI apps (LeakFinder, SignatureViewApp)
• Unit tests and helper targets.
• Primary use-case: Client apps link against the framework to perform cryptographic operations via GnuPG without dealing directly with pipes or subprocesses.
File structure
• Top-level targets:
• LeakFinder (macOS GUI app)
• SignatureViewApp (macOS GUI app)
• Libmacgpg.xcodeproj → builds Libmacgpg.framework & XPC service
• Source/ → Objective-C implementation of:
• GPGTask & GPGTaskHelper (process management)
• GPGStream, file/ memory streaming
• GPGPacket* classes (packet parsing)
• Controllers, Managers, Settings, Exceptions
• XPC entrypoint under org.gpgtools.Libmacgpg.xpc
• UnitTests/ → automated test suite driving the core framework classes.
• Resources/ → localization and configuration (keyserver lists, .plist).
• Build/Install:
• Makefile orchestrates compilation & packaging of framework + XPC service.
README for additional insights
• Confirms framework usage pattern: Link, install framework, install XPC plist and agent, launchctl load helper.