<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCController"
  },
  "title" : "GCController"
}
-->

# GCController

A representation of a real game controller, a virtual controller, or a snapshot of a controller.

```
class GCController
```

## Overview

This class represents a real or virtual controller that a user interacts with during a game. A *real controller* is a physical controller that connects directly or wirelessly to the device. A real controller can be formfitting or can attach closely to a device so players can use controls on both simultaneously. A *virtual controller* is a software emulation of a real controller.

You discover controllers, and then you process the input from those controllers during gameplay. Use the [`controllers()`](/documentation/GameController/GCController/controllers()) method to get the currently connected controllers. If necessary, use the [`startWirelessControllerDiscovery(completionHandler:)`](/documentation/GameController/GCController/startWirelessControllerDiscovery(completionHandler:)) method to connect with wireless controllers.

This framework supports multiple connected game controllers. To identify which player is using a controller in a multiplayer game, check the [`playerIndex`](/documentation/GameController/GCController/playerIndex) property and set it, if necessary. For single-player games, use the [`current`](/documentation/GameController/GCController/current) property to get the controller that the player is actively using.

A controller’s profile encapsulates the details about a controller’s buttons, pads, axis, and other input elements. Get the controller’s profile using one of the profile properties, such as [`extendedGamepad`](/documentation/GameController/GCController/extendedGamepad), and then process the input from its elements.

You can either get the values of input elements on each iteration of your game loop, or set handlers to receive callbacks when those values change. For example, use the [`leftThumbstick`](/documentation/GameController/GCExtendedGamepad/leftThumbstick) property of the [`GCExtendedGamepad`](/documentation/GameController/GCExtendedGamepad) profile to get the thumbstick state. Use the [`valueChangedHandler`](/documentation/GameController/GCExtendedGamepad/valueChangedHandler) property to set a handler that you implement to process any input values that change in the profile.

Alternatively, you can create a snapshot of a real or virtual controller using the [`capture()`](/documentation/GameController/GCController/capture()) method. A *snapshot* is a copy of a controller at a moment in time with its current element values. Creating a snapshot may impact performance, and over time a snapshot doesn’t stay current. Unlike other types of controllers, you can set the values of elements in a snapshot.

## Topics

### Discovering controllers

[`controllers()`](/documentation/GameController/GCController/controllers())

Returns the connected controllers for the device.

[`startWirelessControllerDiscovery(completionHandler:)`](/documentation/GameController/GCController/startWirelessControllerDiscovery(completionHandler:))

Starts searching for nearby wireless controllers.

[`stopWirelessControllerDiscovery()`](/documentation/GameController/GCController/stopWirelessControllerDiscovery())

Stops searching for nearby wireless controllers.

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidConnect>

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidDisconnect>

[`GCControllerDidConnectNotification`](/documentation/GameController/GCControllerDidConnectNotification)

A notification that posts after a controller connects to the device.

[`GCControllerDidDisconnectNotification`](/documentation/GameController/GCControllerDidDisconnectNotification)

A notification that posts after a controller disconnects from the device.

### Handling multiple controllers

[`current`](/documentation/GameController/GCController/current)

The most recently used game controller.

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidBecomeCurrent>

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidStopBeingCurrent>

[`GCControllerDidBecomeCurrentNotification`](/documentation/GameController/GCControllerDidBecomeCurrentNotification)

A notification that posts when a controller becomes the current controller.

[`GCControllerDidStopBeingCurrentNotification`](/documentation/GameController/GCControllerDidStopBeingCurrentNotification)

A notification that posts when a controller stops being the current controller.

### Inspecting a controller

[`isAttachedToDevice`](/documentation/GameController/GCController/isAttachedToDevice)

A Boolean value that indicates whether the controller closely integrates with the device.

[`supportsHIDDevice(_:)`](/documentation/GameController/GCController/supportsHIDDevice(_:))

Returns a Boolean value that indicates whether the framework supports the specified human interface device.

[`shouldMonitorBackgroundEvents`](/documentation/GameController/GCController/shouldMonitorBackgroundEvents)

A Boolean value that indicates whether the app needs to respond to controller events when it isn’t the frontmost app.

### Accessing controller input

[`input`](/documentation/GameController/GCController/input)

The input profile for the controller.

[`GCControllerLiveInput`](/documentation/GameController/GCControllerLiveInput)

The input profile for a controller.

[`GCControllerInputState`](/documentation/GameController/GCControllerInputState)

A class that represents an input state for gamepads and arcade sticks.

### Accessing controller profiles

[`extendedGamepad`](/documentation/GameController/GCController/extendedGamepad)

The extended gamepad profile.

[`GCPhysicalInputProfile`](/documentation/GameController/GCPhysicalInputProfile)

The base class for controller profiles that support physical buttons, thumbsticks, and directional pads.

[`GCKeyboardInput`](/documentation/GameController/GCKeyboardInput)

A controller profile that uses the keyboard as the input device.

[`GCMouseInput`](/documentation/GameController/GCMouseInput)

A controller profile that tracks input from a mouse.

[`GCExtendedGamepad`](/documentation/GameController/GCExtendedGamepad)

A controller profile that supports the extended set of gamepad controls.

[`GCDualShockGamepad`](/documentation/GameController/GCDualShockGamepad)

A controller profile that supports the DualShock 4 controller.

[`GCXboxGamepad`](/documentation/GameController/GCXboxGamepad)

A controller profile that supports the Xbox controller.

[`GCDualSenseGamepad`](/documentation/GameController/GCDualSenseGamepad)

A controller profile that supported the DualSense controller.

[`microGamepad`](/documentation/GameController/GCController/microGamepad)

The micro gamepad profile.

[`GCMicroGamepad`](/documentation/GameController/GCMicroGamepad)

A controller profile that supports the Siri Remote.

[`GCDirectionalGamepad`](/documentation/GameController/GCDirectionalGamepad)

A profile that supports only the directional pad, without motion or rotation.

[`motion`](/documentation/GameController/GCController/motion)

The motion input profile.

[`physicalInputProfile`](/documentation/GameController/GCController/physicalInputProfile)

The physical input profile for the controller.

[`gamepad`](/documentation/GameController/GCController/gamepad)

The gamepad profile.

### Accessing controller elements

[`GCControllerElement`](/documentation/GameController/GCControllerElement)

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

[`GCControllerAxisInput`](/documentation/GameController/GCControllerAxisInput)

A control element that tracks movement along an axis.

[`GCControllerButtonInput`](/documentation/GameController/GCControllerButtonInput)

A control element that represents a button touch or press.

[`GCControllerTouchpad`](/documentation/GameController/GCControllerTouchpad)

A control element that represents a touch event on a touchpad.

[`GCControllerDirectionPad`](/documentation/GameController/GCControllerDirectionPad)

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

[`GCDeviceCursor`](/documentation/GameController/GCDeviceCursor)

A control element for the cursor used as a directional pad.

[`GCDualSenseAdaptiveTrigger`](/documentation/GameController/GCDualSenseAdaptiveTrigger)

A class that encapsulates the features of a DualSense adaptive trigger.

### Identifying controllers and displaying a player index

[`playerIndex`](/documentation/GameController/GCController/playerIndex)

The player index for the controller.

[`GCControllerPlayerIndex`](/documentation/GameController/GCControllerPlayerIndex)

The possible values for controller player indices.

### Accessing battery, haptics, and light objects

[`battery`](/documentation/GameController/GCController/battery)

The controller’s battery information.

[`haptics`](/documentation/GameController/GCController/haptics)

The controller’s haptics information.

[`light`](/documentation/GameController/GCController/light)

The controller’s light settings.

### Creating snapshots

[`withExtendedGamepad()`](/documentation/GameController/GCController/withExtendedGamepad())

Returns a snapshot of a newly created controller with an extended gamepad profile.

[`withMicroGamepad()`](/documentation/GameController/GCController/withMicroGamepad())

Returns a snapshot of a newly created controller with a micro gamepad profile.

[`capture()`](/documentation/GameController/GCController/capture())

Returns a snapshot of the controller with its current element values.

[`isSnapshot`](/documentation/GameController/GCController/isSnapshot)

A Boolean value that indicates whether the controller is a snapshot of a controller.

### Responding to a paused controller or controller event

[`controllerPausedHandler`](/documentation/GameController/GCController/controllerPausedHandler)

The block that the framework calls when the user presses the pause button on the controller.

[`GCGameControllerSceneDelegate`](/documentation/GameController/GCGameControllerSceneDelegate)

[`GCEventInteraction`](/documentation/GameController/GCEventInteraction)

An interaction that indicates the view’s intent to receive game controller
events through the Game Controller framework.

### Identifying the activation context

[`GCGameControllerActivationContext`](/documentation/GameController/GCGameControllerActivationContext)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)