<!--
{
  "availability" : [
    "iOS: 4.2.0 - 10.0.0",
    "iPadOS: 4.2.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.8.0 - 10.12.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKFriendRequestComposeViewController/setMessage(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKFriendRequestComposeViewController(im)setMessage:"
  },
  "title" : "setMessage(_:)"
}
-->

# setMessage(_:)

Sets the text message included in the friend invitation.

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

## Parameters

`message`

The text message.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)