---
title: "setMessage(_:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkfriendrequestcomposeviewcontroller/setmessage(_:)"
---

# setMessage(_:)

Sets the text message included in the friend invitation.

## Declaration

```swift
func setMessage(_ message: String?)
```

## Parameters

- `message`: The text message.

## Discussion

Discussion If you do not set a text message, GameKit sets a default text message.
