Protocol string name in EADemo code

When I first connect the MFi accessory, what protocols do I need to declare in the plist file and where can I get its name from?
Even after plugging in my MFi accessory and running the EADemo code, it still says No Accessory Connected?
I assume that the EADemo code will not work until and until some valid protocol lines associated with it are written instead of com.apple.p1 and com.apple.p2.

I know there is a class called EAAccessory and using the protocolString property, I can find out the String protocol name. But first of all, even for this, the protocol string name specified in the plist file is required to run the code.

Do I need to ask the manufacturer to find out about the protocol string or is there a universal protocol that can work for all MFi accessories?

+6
source share
2 answers

MFI has a complicated process with an Apple device, and sometimes the manufacturer has not completed the entire process. And based on your description, the problem not only in the String protocol is incorrect. the manufacturer took a lot of work. You must try another manufacturer’s accessory.

0
source

I tested the removal of supported accessories (which have com.apple.p1 and com.apple.p2 ), and the EADemo sample application still detected connected accessories and allowed EADemo to view the protocols that they supported.

I have not tested sending data, but as for the above functionality, I have seen identical behavior.

To answer your general question, yes, if you want to communicate with ExternalAccessory , you must specify the accessory protocol in your information plist.

I did a few more searches, but could not find many references to com.apple.p1 . The only place I could find was in this project on GitHub. However, I think this may be the case of Cargo Cult Programming .

Or maybe the protocols do something, and I just couldn't see the difference in behavior.

0
source

Source: https://habr.com/ru/post/903178/


All Articles