---
title: "findMatch(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkgameactivity/findmatch(completionhandler:)"
---

# findMatch(completionHandler:)

Use information from the activity to find matches for the local player.

## Declaration

```swift
func findMatch(completionHandler: @escaping @Sendable (GKMatch?, (any Error)?) -> Void)
```

```swift
func findMatch() async throws -> GKMatch
```

## Mentioned in

Creating activities for your game

## Discussion

Discussion GameKit creates a classic match making request with the activity’s party code and other information, and returns the match object in the completion handler or any error that occurred. An error occurs if this activity doesn’t support party code, or has an unsupported range of players, which is used to be configured as match request’s minPlayers and maxPlayers.

## See Also

### Performing a matchmaking request

- [findPlayersForHostedMatch(completionHandler:)](gamekit/gkgameactivity/findplayersforhostedmatch(completionhandler:).md)
