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

# addRecipients(withEmailAddresses:)

Adds recipients based on their email addresses.

## Declaration

```swift
func addRecipients(withEmailAddresses emailAddresses: [String])
```

## Parameters

- `emailAddresses`: An array with one or more doc://com.apple.documentation/documentation/Foundation/NSString objects, each containing an email address.

## 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. Adding more players than defined by the maxNumberOfRecipients() property causes an exception to be thrown.

## See Also

### Adding Recipients

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