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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.