XPC is the preferred inter-process communication (IPC) mechanism on Apple platforms. XPC has three APIs:
-
The high-level
NSXPCConnection
API, for Objective-C and Swift -
The low-level Swift API, introduced with macOS 14
-
The low-level C API, which, while callable from all languages, works best with C-based languages
General:
-
DevForums tag: XPC
-
Creating XPC services documentation
-
XPC has extensive man pages — For the low-level API, start with the
xpc
man page; this is the original source for the XPC C API documentation and still contains titbits that you can’t find elsewhere. Also read thexpcservice.plist
man page, which documents the property list format used by XPC services. -
Daemons and Services Programming Guide archived documentation
-
WWDC 2012 Session 241 Cocoa Interprocess Communication with XPC — This is no longer available from the Apple Developer website )-:
-
Technote 2083 Daemons and Agents — It hasn’t been updated in… well… decades, but it’s still remarkably relevant.
-
TN3113 Testing and Debugging XPC Code With an Anonymous Listener
-
XPC and App-to-App Communication DevForums post
-
Validating Signature Of XPC Process DevForums post
Related tags include:
-
Inter-process communication, for other IPC mechanisms
-
Service Management, for installing and uninstalling Service Management login items,
launchd
agents, andlaunchd
daemons
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"