Chapter 12

Device-to-Device Communication with Game Kit

WHAT’S IN THIS CHAPTER?

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

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/WileyCDA/WroxTitle/Professional-iOS-Network-Programming-Connecting-the-Enterprise-to-the-iPhone-and-iPad.productCd-1118362403.html 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 Auctioneer.zip.

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 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.