17

Bluetooth Programming

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Using the various APIs within the Game Kit framework for Bluetooth communications
  • How to look for peer Bluetooth devices using the GKPeerPickerController class
  • Sending and receiving data from a connected device
  • How to implement Bluetooth voice chat

The iPhone and iPad include built-in Bluetooth functionality, enabling them to communicate with other Bluetooth devices, such as Bluetooth headsets, iPhone, iPod touch, and iPad. This chapter shows you how to write iPhone and iPad applications that use Bluetooth to communicate with another device, performing tasks such as sending and receiving text messages, as well as voice chatting. Daunting as it may sound, Bluetooth programming is actually quite simple using the iOS SDK. All the Bluetooth functionalities are encapsulated within the Game Kit framework.

image NOTE To test the concepts covered in this chapter, you need at least one device: iPad, iPhone (4S, 4, 3G or 3GS), or iPod touch (second generation or later) running iPhone OS 3.0 or later.

Get Beginning iOS 5 Application Development 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.