The Peer Picker

Apple provides a built-in interface for finding other devices to connect to called the Peer Picker (Figure 10.2). The Peer Picker makes it extremely easy for your users to find peers and automates most of the functionality of connecting so that you don’t need to get your hands dirty.

Image

Figure 10.2 The Peer Picker searching for available devices.

In the sample app, when it is launched, there is a single button in the center of the screen titled Connect to New Peer. This action will trigger the Peer Picker using the connect: method.

The connect: method starts off by allocating and initializing a new instance of GKPeerPickerController ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.