<!--
{
  "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/controllers()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCController(cm)controllers"
  },
  "title" : "controllers()"
}
-->

# controllers()

Returns the connected controllers for the device.

```
class func controllers() -> [GCController]
```

## Return Value

The currently connected controllers.

## Discussion

To track the connection status of controllers, observe the framework notifications. The framework posts the <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidConnect> (Swift) and <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidBecomeCurrent> (Swift) notifications when a controller connects to a device. For Objective-C, it posts the [`GCControllerDidConnectNotification`](/documentation/GameController/GCControllerDidConnectNotification) and [`GCControllerDidBecomeCurrentNotification`](/documentation/GameController/GCControllerDidBecomeCurrentNotification) notifications. When a controller disconnects from a device, it posts the <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidDisconnect> (Swift) and <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/GCControllerDidStopBeingCurrent> (Swift) notifications. For Objective-C, it posts the [`GCControllerDidDisconnectNotification`](/documentation/GameController/GCControllerDidDisconnectNotification) and [`GCControllerDidStopBeingCurrentNotification`](/documentation/GameController/GCControllerDidStopBeingCurrentNotification) notifications.

---

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)