Framework

Game Controller

Support hardware game controllers in your game.

Overview

The Game Controller framework is used to discover game controllers connected to a device and receive input data from them. You use control profiles to map the physical controls on the device to the inputs needed in your game. After retrieving a profile from the controller, you can either poll the current values of its controls or add handlers to be called when control values change. For more about implementing support for game controllers, see Game Controller Programming Guide.

Topics

Game Controllers

GCController

A representation of a physical game controller, connected to the device either physically or through a wireless connection.

Input Elements

GCControllerElement

An input associated with a physical control, such as a button or thumbstick.

GCControllerAxisInput

A control element measuring movement along a particular axis.

GCControllerButtonInput

A control element measuring a button press.

GCControllerDirectionPad

A control element associated with a directional pad or a thumbstick.

Control Profiles

A profile maps the hardware controls of a particular controller to a predefined set of elements.

GCExtendedGamepad

The extended set of gamepad controls.

GCGamepad

The standard set of gamepad controls.

Deprecated
GCMicroGamepad

The controls provided by the Siri Remote.

GCMotion

The orientation and motion of the controller.

Profile Snapshots

Snapshots are used to save the current values of a profile's elements to an object that can be read later.

GCExtendedGamepadSnapshot

A recording of all of the values provided by a GCExtendedGamepad object.

Deprecated
GCGamepadSnapshot

A recording of all of the values provided by a GCGamepad object.

Deprecated
GCMicroGamepadSnapshot

A recording of all of the values provided by a GCMicroGamepad object.

Deprecated

Routing Events

GCEventViewController

A view controller that determines how game controller input data is routed by the operating system.

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software