Protocol

GKSessionDelegate

An object implements the GKSessionDelegate protocol to control the behavior of a GKSession object. The delegate is called when other visible peers change their state relative to the session. It is also called to determine whether another peer is allowed to connect to the session.

Declaration

@protocol GKSessionDelegate

Topics

Observing Changes to Peers

- session:peer:didChangeState:

Received by the delegate when a peer changes state.

Connection Requests from Other Peers

- session:didReceiveConnectionRequestFromPeer:

Received by the delegate when a remote peer wants to create a connection to the session.

Connection Errors

- session:connectionWithPeerFailed:withError:

Received by the delegate when an attempt to connect to another peer failed.

- session:didFailWithError:

Sent to the delegate when a serious error has occurred in the session.

Relationships

Inherits From

See Also

Sessions

GKSession

A GKSession object provides the ability to discover and connect to nearby iOS devices using Bluetooth or Wi-fi.

Deprecated