xpcservice.plist(5) | File Formats Manual | xpcservice.plist(5) |
xpcservice.plist
—
XPC Service configuration keys and values
This document describes the keys-value pairs which configure an
XPC Service. An XPC Service is a process which implements the server-side of
an XPC
connection. The service program is contained
inside a Mac OS X bundle. The bundle contains an Info.plist. The XPC Service
configuration settings are specified by keys and values defined in a
dictionary included within the Info.plist.
An application has a namespace which maps a service name to a running instance of the service program. The namespace is created dynamically and is unique to each application. The namespace is populated with the set of services embedded in the application bundle and embedded in the frameworks used by the application.
System frameworks may have embedded XPC Services. Typically, a developer would not connect to this service directly. Instead, the developer would call an API function in the framework and that would contact the service. However, the name of XPC Service must be in the application's namespace so that the framework code can "see" and connect to the service.
XPC Services are "launched-on-demand". They are only started when an application creates a connection to the service and sends a message to it. The service process can be terminated when it is inactive and has been idle for a a period of time. The service process can be started again upon receipt of a new message or connection request. XPC Services should be state-less so that they can come and go as needed.
The results of a connection request to an XPC Service from two different applications depends upon the type of the service. The service type controls the policy used to create a new instance of the service. For example, a new connection request from two different applications to an Application-type service in a framework will result in a new instance of the service being created for each application.
Services embedded in an application bundle will only be visible to the containing application and will be, by default, Application-type services. A subsequent connection request from an application to a service will result in a new connection to an existing service.
These top-level Info.plist keys are required to be defined in the Info.plist file:
The XPC Service may be configured by setting these keys in the XPCService dictionary:
February 8, 2011 | Darwin |