This represents a growing attack vector for viruses and other malware. Modern applications increasingly rely on untrusted data, such as web pages, files sent by email, and so on. This separation lets you ensure that that, if it crashes, the rest of the application is not affected. When one part of an application is more at risk for crashes, it can be useful to separate out the potentially unstable functionality from the core of the application.
For example, the stability of any application with a plug-in API is inherently at the mercy of the authors of plug-ins. Often, certain parts of an application are more prone to crashes than others. We don’t want it to happen, but it does anyway. Let’s face it applications sometimes crash. There are two main reasons to use XPC services: privilege separation and stability.
The XPC Services API allows you to create lightweight helper tools, called XPC services, that perform work on behalf of your application. The XPC Services API, part of libSystem, provides a lightweight mechanism for basic interprocess communication integrated with Grand Central Dispatch (GCD) and launchd.