queryQueueActivity(_:withCompletionHandler:)
Finds the number of players in a specific queue who recently requested a match.
Declaration
func queryQueueActivity(_ queueName: String, withCompletionHandler completionHandler: (@Sendable (Int, (any Error)?) -> Void)? = nil)func queryQueueActivity(_ queueName: String) async throws -> IntParameters
- 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:
activityThe number of match requests in the queue during the previous 60 seconds.
errorDescribes an error if it occurs, or
nilif the operation completes.
Discussion
To specify a queue name when requesting a match, set the GKMatchRequest queueName property. For more information, see Matchmaking rules.