How to exchange data via Bluetooth using the iPhone SDK?

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

+3
source share
1 answer

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

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

The main process is setting up the controller and delegate to work with the Bluetooth connection for you. Your delegate should handle things like "Connected to a peer-to-peer network" or "Received data."

In addition, you should note that the simulator does not work with Bluetooth, so you need two real iOS devices or more for testing.

+2
source

Source: https://habr.com/ru/post/1779111/


All Articles