iosiphonebluetoothnsnetservicensnetservicebrowser

Connect to BLE device and send/read data via NSNetService on iOS 7


I have an iPhone app which communicates with external device via NSNetService. Now I want to add support for bluetooth. So I would like to discover and connect to device via bluetooth (BLE) and when connected I would like to send/receive data via NSNetService, so I reuse existing code...

Is this possible on iOS7+? Any example/hint would be much appreciated.


Solution

  • NSNetService uses TCP/IP and multicast DNS. Bluetooth Low Energy does not implement a TCP/IP network and so NSNetService cannot be applied to BLE connections.