O'Reilly logo

iOS and OS X Network Programming Cookbook by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a peer-to-peer bluetooth network

In this recipe, we will create a peer-to-peer bluetooth network, which we will use to exchange text messages. To create a bluetooth peer-to-peer network, we will use Apple's Game Kit framework. So, we will need to add the Gamekit framework to our project.

The downloadable code for this project creates a peer-to-peer network that is used to exchange text messages. Each individual message that is sent over the bluetooth network can have a maximum size of 90 KB. If the data that we are sending is greater then 90 KB, we will need to break the data apart and send it as multiple messages.

We will be implementing the GKPeerPickerController and GKSession delegate methods. The GKPeerPickerController method provides ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required