1

Up until iOS5 CFNetwork was all you had to use to be able to find and connect to devices using both WiFi and Bluetooth, but as of iOS5 Apple decided to restrict CFNetowrk to only find and comunicate with services over WiFi (Technical Q&A QA1753) So I was left with a huge amount of code that I cant use no more and must now focus on C based implementation using C based API to rewrite bluetooth communication over bonjour.

Since this is the low level type of code, and I am not a deep C diver, I would like to know if there are examples or even better sample code of such communication, where you have a Server class and Browser class. It will take me ages to write it my self, so if you know any of those samples I would greatly appreciate it.

Cyprian
  • 9,423
  • 4
  • 39
  • 73

1 Answers1

0

You should check out to see if Apple GameKit would fit your needs.

GameKit handles pairing Bluetooth devices. You implement you own pairing of WiFi connected devices. GameKit handles the rest of the communication.

I was facing similar problems wanting to use both WiFi and Bluetooth. GameKit worked very well for me. Reduced my networking code by more than half.

Apple has good sample code on their developer site.

Niels Castle
  • 8,039
  • 35
  • 56