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


class GCController : NSObject


Discovering Controllers

class func stopWirelessControllerDiscovery()

Stops browsing for nearby controllers.

class func controllers() -> [GCController]

The controllers connected to the device.

Determining Which Profiles Are Supported by a Controller

var gamepad: GCGamepad?

The gamepad profile.

var extendedGamepad: GCExtendedGamepad?

The extended gamepad profile.

var microGamepad: GCMicroGamepad?

The micro gamepad profile.

var motion: GCMotion?

The motion input profile.

Responding When a Controller Is Paused

var controllerPausedHandler: ((GCController) -> Void)?

A block called when the controller’s pause button is pressed.


Inspecting a Controller

var isAttachedToDevice: Bool

A Boolean property that indicates whether the controller is closely integrated with the device.

var vendorName: String?

The name of the vendor that manufactured the controller.

Assigning a Player Index

var playerIndex: GCControllerPlayerIndex

The player index assigned to the controller.

Determining Which Dispatch Queue Notifications are Dispatched On

var handlerQueue: DispatchQueue

The dispatch queue to be used when the values of a game controller’s input values change.


enum GCControllerPlayerIndex

Predefined values for controller indices.


static let GCControllerDidConnect: NSNotification.Name

Posted immediately after a new controller is connected to the device.

static let GCControllerDidDisconnect: NSNotification.Name

Posted immediately after a controller is disconnected from the device.

Instance Methods


Inherits From

Conforms To

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