Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blutooth Peer To Peer Connection on iOS 7 using NSNetService

I'm trying to get the Objective C++ distributed object model working between iOS and OSX devices. Using WiFi, almost everything is fine; however, with iOS 7 Apple introduced the "includesPeerToPeer" property which should publish an NSNetService over Bonjour using Blutooth. I set the property like this:

self.netService.includesPeerToPeer = YES;

before calling

[self.netService publish];

This works fine wetween a MAC and any iOS Device running iOS 7 (given, the MAC and the device are paired before). However, the devices don't discover themselves over Blutooth.

I'm wondering, whether I missed something or anyboldy has a glue, why this is not working.

like image 588
Tommy356 Avatar asked Oct 23 '13 14:10

Tommy356


1 Answers

Well, got it. NSNetServiceBrowser now also has a new property called "includesPeerToPeer". When setting this to TRUE immediately after initialisation and before starting the search, devices find themselves.

like image 87
Tommy356 Avatar answered Sep 30 '22 00:09

Tommy356