---
title: "addRecipients(withPlayerIDs:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkfriendrequestcomposeviewcontroller/addrecipients(withplayerids:)"
---

# addRecipients(withPlayerIDs:)

Adds recipients based on their Game Center player identifiers.

## Declaration

```swift
func addRecipients(withPlayerIDs playerIDs: [String])
```

## Parameters

- `playerIDs`: An array with one or more doc://com.apple.documentation/documentation/Foundation/NSString objects, each containing an player identifier.

## Discussion

Discussion If you do not add at least once recipient, the recipients field is selected when the view controller is presented so that the player can type a list of recipients.

## See Also

### Adding Recipients

- [addRecipients(withEmailAddresses:)](gamekit/gkfriendrequestcomposeviewcontroller/addrecipients(withemailaddresses:).md)
- [addRecipientPlayers(_:)](gamekit/gkfriendrequestcomposeviewcontroller/addrecipientplayers(_:).md)
