backboardd

From iPhone Development Wiki

backboardd, or BackBoard, is a daemon introduced in iOS 6 to take some of the workload off of SpringBoard. Its chief purpose is to handle events from the hardware, such as touches, button presses, and accelerometer information. It communicates with SpringBoard through BackBoardServices.framework. In iOS 6, it serves as the bridge between IOKit and userland processes.

BackBoard also manages the launching, suspension, and termination of application processes.

Hardware Management

BackBoard is responsible for forwarding the following hardware events to processes:

  • Touch events
  • Accelerometer input
  • Hardware keyboard input
  • Orientation events
  • Proximity sensor events
  • TV/Video out events

The above events are received from IOKit and processed into the corresponding GSEvent, which is then sent to the destination process via the GSEvent framework.

Going in the opposite direction, backboardd also allows processes (such as Preferences.app and SpringBoard) to interact with some parts of the hardware, such as changing the brightness level. This interaction is mainly handled by BackBoardServices.framework.

Handling Touch Events

BackBoard is responsible for deciding what application should receive the touch events that come in from IOKit. When a digitizer event is received, BackBoard calls the -contextIdAtPosition: method of the current CAWindowDisplayServer to get the context ID which the touch should be sent to. This is how it decides the process that should receive the touch.