---
title: "presentFriendRequestCreator(from:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gklocalplayer/presentfriendrequestcreator(from:)-7j1kn"
---

# presentFriendRequestCreator(from:)

Presents a view controller with a Messages sheet for the player to request friends.

## Declaration

```swift
func presentFriendRequestCreator(from viewController: UIViewController) throws
```

## Parameters

- `viewController`: The view controller that contains the Messages sheet, and that this method presents.

## Mentioned in

Connecting players with their friends in your game

## Discussion

Discussion If this method throws an exception, it doesn’t present the view controller.

## See Also

### Adding Friends

- [isPresentingFriendRequestViewController](gamekit/gklocalplayer/ispresentingfriendrequestviewcontroller.md)
- [presentFriendRequestCreator(from:)](gamekit/gklocalplayer/presentfriendrequestcreator(from:)-7clh6.md)
