ios
ios

Reputation: 6164

How do I exchange data via Bluetooth using the iPhone SDK?

How do I exchange data programmatically via Bluetooth using the iPhone SDK?

Upvotes: 3

Views: 3467

Answers (1)

Moshe
Moshe

Reputation: 58087

To exchange data using the iPhone SDK, you should to use the GameKit Framework.

You can look at this sample code, or this sample code from a live app in the app store, or the code mentioned by Randolph, here.

The basic process is setting up a controller and a delegate to handle the bluetooth connection for you. Your delegate needs to handle things like "Connected to peer" or "Received data".

Also, you should note that the simulator does not work with bluetooth and so you will need two real iOS devices or more to test with.

Upvotes: 2

Related Questions