<!--
{
  "availability" : [
    "iOS: 17.2.0 -",
    "iPadOS: 17.2.0 -",
    "macCatalyst: 17.2.0 -",
    "macOS: 14.2.0 -",
    "tvOS: 17.2.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchmaker/queryQueueActivity(_:withCompletionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatchmaker(im)queryQueueActivity:withCompletionHandler:"
  },
  "title" : "queryQueueActivity(_:withCompletionHandler:)"
}
-->

# queryQueueActivity(_:withCompletionHandler:)

Finds the number of players in a specific queue who recently requested a match.

```
func queryQueueActivity(_ queueName: String, withCompletionHandler completionHandler: (@Sendable (Int, (any Error)?) -> Void)? = nil)
```

## Parameters

`queueName`

The name of the queue that Game Center places the match requests in, which it uses for finding players when using matchmaking rules. This uniform type identifier (UTI) contains  only alphanumeric characters (A-Z, a-z, 0-9), hyphens (-), or periods (.).

    The string should be in reverse-DNS format and queue names are case sensitive.

`completionHandler`

The block that GameKit calls when it completes the request.

    This block receives the following parameters:

- `activity`: The number of match requests in the queue during the previous 60 seconds.
- `error`: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

To specify a queue name when requesting a match, set the `GKMatchRequest` [`queueName`](/documentation/GameKit/GKMatchRequest/queueName) property. For more information, see [Matchmaking rules](/documentation/GameKit/matchmaking-rules).

---

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)