Johnny Tee
Johnny Tee

Reputation: 191

How do I connect a bluetooth accessory to an iPhone via bluetooth?

I've seen some conflicting information about connecting a device to an iPhone via Bluetooth. Basically, I've created an iPhone app that should communicate to a hardware device I've built with a bluetooth chip in it.

I've seen ExternalAccessory.framework is the way to do this, but do I need to participate in Apple's "Made for iPod" program in order to sell my hardware?

I've also heard that bluetooth on the iPod/iPhone is crippled for some reason - meaning I can't use bluetooth to transfer data to my hardware device. Is there any truth to this?

Any help is appreciated.

Upvotes: 2

Views: 1949

Answers (2)

kennytm
kennytm

Reputation: 523264

Note that this answer is only correct for iOS 4 or below. Nowadays we have CoreBluetooth which may help the situation. Check https://developer.apple.com/bluetooth/ for detail.


No you can't communicate directly to the bluetooth chip. It requires IOKit.

However, you can send file via bluetooth to another iPod/iPhone via GameKit.

Upvotes: 2

Martijn Thé
Martijn Thé

Reputation: 4704

Today (2015) I would recommend using Bluetooth Low Energy (BLE) and the CoreBluetooth API. This does not require you to enroll into Made for iPhone (MFi). It is pretty clear from Apple's recent Bluetooth additions that they are mostly focussed on Bluetooth Low Energy (4.0) and less on Bluetooth BR/EDR (2.1). They have been steadily adding general improvements to CoreBluetooth, a bunch of new system services (ANCS, AMS, MIDI over GATT) and they've recently embraced the BT 4.2 spec.

If you want to let the device communicate with your iOS app and for whatever reason you must use BR/EDR (2.1), you'll need EAAccessory and therefore you'll need to enroll into MFi.

If you can use BLE, I would avoid MFi and let your app communicate with it using CoreBluetooth.

Upvotes: 0

Related Questions