---
title: "peerPickerControllerDidCancel(_:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkpeerpickercontrollerdelegate/peerpickercontrollerdidcancel(_:)"
---

# peerPickerControllerDidCancel(_:)

Tells the delegate that the user canceled the connection attempt.

## Declaration

```swift
optional func peerPickerControllerDidCancel(_ picker: GKPeerPickerController)
```

## Parameters

- `picker`: The controller for the peer picker dialog.

## Discussion

Discussion After this method returns, the controller dismisses the picker interface. important: Although optional in the protocol, Game Kit expects your application to implement this method.
