---
title: GKPeerPickerController
framework: gamekit
role: symbol
role_heading: Class
path: gamekit/gkpeerpickercontroller
---

# GKPeerPickerController

Provides a standard user interface to allow one iOS device to discover and connect to another.

## Declaration

```swift
class GKPeerPickerController
```

## Overview

Overview The result is a configured GKSession object connecting the two devices. To use a GKPeerPickerController object, your application creates the controller, adds a delegate, configures the allowed connection types, and then shows the peer picker. The delegate is called as the user makes selections within the peer picker interface. In iOS 3.0, the peer picker can be configured to select between Bluetooth and Internet connections. important: Although users can select Internet connections in the peer picker, GKPeerPickerController has no user interface for configuring them. If your application configures the peer picker to allow Internet connections, your application must also dismiss the peer picker and present its own interface to configure an Internet connection. On iOS 3.0, your application should release the peer picker object after it dismisses the peer picker dialog. On iOS 3.1 or later, your application may release the peer picker after it is shown to the user. If you do this, the peer picker controller is automatically deallocated after the dialog is dismissed.

## Topics

### Setting and Getting the Delegate

- [delegate](gamekit/gkpeerpickercontroller/delegate.md)

### Displaying the Picker Dialog

- [dismiss()](gamekit/gkpeerpickercontroller/dismiss().md)
- [show()](gamekit/gkpeerpickercontroller/show().md)
- [isVisible](gamekit/gkpeerpickercontroller/isvisible.md)

### Configuring Connectivity Options

- [connectionTypesMask](gamekit/gkpeerpickercontroller/connectiontypesmask.md)

### Constants

- [GKPeerPickerConnectionType](gamekit/gkpeerpickerconnectiontype.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated classes

- [GKAchievementViewController](gamekit/gkachievementviewcontroller.md)
- [GKChallengeEventHandler](gamekit/gkchallengeeventhandler.md)
- [GKChallengesViewController](gamekit/gkchallengesviewcontroller.md)
- [GKChallenge](gamekit/gkchallenge.md)
- [GKScoreChallenge](gamekit/gkscorechallenge.md)
- [GKAchievementChallenge](gamekit/gkachievementchallenge.md)
- [GKCloudPlayer](gamekit/gkcloudplayer.md)
- [GKGameCenterViewController](gamekit/gkgamecenterviewcontroller.md)
- [GKGameSession](gamekit/gkgamesession.md)
- [GKGameSessionSharingViewController](gamekit/gkgamesessionsharingviewcontroller.md)
- [GKFriendRequestComposeViewController](gamekit/gkfriendrequestcomposeviewcontroller.md)
- [GKLeaderboardViewController](gamekit/gkleaderboardviewcontroller.md)
- [GKScore](gamekit/gkscore.md)
- [GKSession](gamekit/gksession.md)
- [GKTurnBasedEventHandler](gamekit/gkturnbasedeventhandler.md)
