Chapter 12

Device-to-Device Communication with Game Kit


  • Using Game Kit classes and configuring transfer options
  • Understanding traditional client-server communication
  • creating peer-to-peer connections


The code downloads for this chapter are found at on the Download Code tab. The code for this chapter is found in the Chapter 12 download and is all from one example project: Game Kit

All communication topics covered so far have assumed that the device is connected to a network that is connected to the Internet at large; however, iOS devices can transfer data even in the absence of a traditional network. Apple’s Game Kit framework facilitates device-to-device communication in environments lacking cellular service, access to power to run a Wi-Fi infrastructure, or some other limitation that precludes offering access to a local area network (LAN) or the Internet. Examples might be deep in a national forest, on a remote stretch of highway, or far underground in a building’s subbasement.

Although the name implies its most common use, Game Kit is not only about enabling multiplayer games. The framework is data-agnostic, and apps can send any type of data using a variety of communication options. Its unique capability to operate over both short-range personal ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

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