Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bluetooth protocol names for UISupportedExternalAccessoryProtocols

I'm using iOS9 and Swift 2 to build an app that gets notification when the iPhone is connected/disconnected to the car's bluetooth. I'm using EAAccessoryManager.sharedAccessoryManager().connectedAccessories to get a list of connected accessories.

I've added UISupportedExternalAccessoryProtocols in Info.plist, but I don't know what protocols to add. Can someone nudge me in the direction where I can get these protocol names. I hope the protocol names are generic that they work with the bluetooth device in any car.

When I run the app I get 0 connected device even though my phone is connected to my car's bluetooth.

Thank You!

like image 223
Jacob Thomas Avatar asked Apr 25 '16 19:04

Jacob Thomas


1 Answers

You have to request the provider to get the protocol-name of the given hardware.

But as far as I understood these accessory-thing, the requirements to detect hardware via Bluetooth (with the special iPod Accessory Protocol” > iAP-Protcol) are:

  1. the hardware contains this mfi-chip
  2. you added the "Made for iOS Product Plan ID (MFi PPID)" into your info.plist (in Supported external accessory protocols)

ps.: your phone is connected via Bluetooth Low Energy

like image 79
Sandu Avatar answered Sep 30 '22 13:09

Sandu