---
title: "matchmakerViewController(_:didFindPlayers:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfindplayers:)"
---

# matchmakerViewController(_:didFindPlayers:)

Called when a hosted match is found.

## Declaration

```swift
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindPlayers playerIDs: [String])
```

## Parameters

- `viewController`: The view controller that performed the matchmaking.
- `playerIDs`: An array of NSString objects containing player identifier for the matched players.

## Discussion

Discussion This method is called when the view controller’s hosted property is true. Although optional in the protocol, if your game attaches a delegate to the view controller for a hosted match, the view controller expects your game to provide an implementation of this method. The view controller returns the list of players to your game by calling this method. Your game is responsible for connecting these players to your own server and then using that server to relay messages between the players.

## See Also

### Related Documentation

- [matchmakerViewController(_:didFind:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfind:).md)

### Deprecated Methods

- [matchmakerViewController(_:didReceiveAcceptFromHostedPlayer:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didreceiveacceptfromhostedplayer:).md)
