Bluetooth protocol names for UISupportedExternalAccessoryProtocols
Asked Answered
B

3

6

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!

Budworth answered 25/4, 2016 at 19:41 Comment(3)
I believe that that framework is only for MFi accessories. You won't see generic Bluetooth accessories such as a car Bluetooth connection.Footsore
@Footsore Is there any way to see generic accessories? I specifically want to know if the user is in their car from the Bluetooth 2 pairing. Some apps do this, but I don't yet know how.Thierry
You can detect connectivity to a Bluetooth audio device through the av framework but neither Core Bluetooth nor External Accessory framework will give you this information.Footsore
D
1

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

Dispose answered 5/4, 2017 at 9:52 Comment(1)
Your first link is no longer available. Thaks!Toni
A
0

You can use the sample app for EA.Framework, when you will run it will detect your classic bluetooth accessories around your iOS device. If your device is in the table of sample app check its info you will have its corresponding protocol. Write it in your .plist to communicate. That happened in my case.

Ansate answered 12/8, 2016 at 6:28 Comment(0)
P
0

The protocol name specified in the info.plist file of the iOS project is defined by the hardware product constructor. It must have a unique name, typically using a reverse-DNS form: com.yourcompany.product_name.

Pogey answered 2/7, 2018 at 9:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.