---
title: "peerPickerController(_:didSelect:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkpeerpickercontrollerdelegate/peerpickercontroller(_:didselect:)"
---

# peerPickerController(_:didSelect:)

Tells the delegate that the user selected a connection type.

## Declaration

```swift
optional func peerPickerController(_ picker: GKPeerPickerController, didSelect type: GKPeerPickerConnectionType)
```

## Parameters

- `picker`: The controller for the peer picker dialog.
- `type`: The type of network connection chosen by the user.

## Discussion

Discussion If the peer picker is configured to allow users to choose between multiple connection types, this method is called when users select the connection type they want to use. Your delegate implements this method if you want to override the behavior for a particular connection type. important: In iOS 3.0, the peer picker can configure Bluetooth connections (GKPeerPickerConnectionType.nearby). If the user chooses an Internet connection (GKPeerPickerConnectionType.online), your delegate should dismiss the dialog and present its own user interface to configure the Internet connection: - (void)peerPickerController:(GKPeerPickerController *)picker didSelectConnectionType:(GKPeerPickerConnectionType)type {     if(type == GKPeerPickerConnectionTypeOnline) {         [picker dismiss];         [picker autorelease]; // Display your own user interface here. }

## See Also

### Creating a Session for the Peer Picker

- [peerPickerController(_:sessionFor:)](gamekit/gkpeerpickercontrollerdelegate/peerpickercontroller(_:sessionfor:).md)
