4

I need to know few things about IOBlueTooth framework for MAC:

  1. Does this framework support BTLE?
  2. What different does it has from iOS framework CoreBlueTooth?
  3. To support BTLE on MAC OSX, do we need both IOBlueTooth & CoreBlueTooth framworks? Please share link for some sample app, if any?

Also, please point me to some good documentation or WWDC videos for IOBlueTooth framework.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Abhinav
  • 37,684
  • 43
  • 191
  • 309

1 Answers1

3

1.) Yes..assuming you have a mac that supports BLE (airs, minis, and newest macbook pro's i believe)

2.) The IOBluetooth framework contains C and Objective-c api's to connect to nearby Bluetooth devices (not only BLE devices). So yes, it contains the CoreBluetooth.framework, but the IOBluetooth framework allows you to interact with Bluetooth devices supporting other protocols as well.

3.) You need to import the IOBluetooth.framework since CoreBluetooth.framework is embedded inside it, but that's all you need to do with it.

Check out the Heart Rate Monitor sample code.

Tommy Devoy
  • 13,441
  • 3
  • 48
  • 75
  • Ok. With CoreBlueTooth framework iOS device can act both as peripheral and central but per my understanding with IOBluetooth framework MAC can only act as Central. Is that true? If so then how is CoreBlueTooth framework inclusive in IOFramework? – Abhinav Oct 23 '13 at 18:04
  • Yeah there is no access to peripheralManager functionality on osx. That was introduced only in iOS 6 and the osx corebluetooth was never updated. I'm referring to the fact that the actual CoreBluetooth framework is embedded inside the IOBluetooth framework. – Tommy Devoy Oct 23 '13 at 18:16
  • Got you. Any idea how do we broadcast a CLBeaconRegion in OSX? I have done this in iOS by accessing peripheral manager. Upvoting! – Abhinav Oct 23 '13 at 18:20
  • Idk offhand I'd just say keep on those feature requests to Apple. Probably not possible right now. – Tommy Devoy Oct 23 '13 at 18:25
  • And I'll send in a couple myself as well! Cheers! – Tommy Devoy Oct 23 '13 at 18:40
  • @Abhinav If you want to use a Mac as an iBeacon then you can check out my SO answer (http://stackoverflow.com/questions/19410398/turn-macbook-into-ibeacon/19741615#19741615) and blog post at http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/ – mttrb Nov 07 '13 at 03:40
  • @mttrb : Your blog was very informative. I wanted to know if you have used IOBlueTooth framework for constructing UI. I need a sample bluetooth app for MAC. – Abhinav Nov 13 '13 at 00:10