November 2011
Beginner
238 pages
6h 19m
English
In the previous sections, we saw that we get a lot for free when using a GKPeerPickerController. However, after we accepted a connection from another user, our app didn't yet know how to proceed.
In this section we, discuss the GKPeerPickerControllerDelegate. The GKPeerPickerControllerDelegate is called by the Peer Picker to create a new session object and used to handle state changes that occur thoughout the course of normal networking.
The GKPeerPickerControllerDelegate has three main responsibilities that you need to implement and respond to. It needs to create the session, respond to new connection messages, and handle the user cancelling out of the Peer Picker.
First, let's look at peerPickerController:didSelectConnectionType:. ...