Whenever I connect the MFi accessory for the first time which protocols do I need to declare in the plist file and from where can I get it`s name?
Even after connecting my MFi accessory and running the EADemo code still it says that No Accessory Connected ?
I assume that the EADemo code will not work unless and until some proper accessory related protocol strings would be written instead of com.apple.p1 and com.apple.p2.

I know there is a class called EAAccessory and using the property protocolString, I can know the protocol String name.But in the first place even that requires a protocol string name listed in plist file in order to run the code.

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

有帮助吗?

解决方案

MFI have a complicated process with Apple device, and sometimes the manufacturer didn't finished all the process. And base on your describe, the problem not just the protocolString is not right. the manufacturer needed much work to do. you should try another manufacturer's accessory.

其他提示

I tested deleting the Supported Accessories (which contains com.apple.p1 and com.apple.p2) and the EADemo sample app still detected connected accessories and allowed me to view the protocols that they support.

I didn't test sending data but as far as the above mentioned functionality is concerned, I saw identical behavior.

To answer your general question, yes, if you want to communicate with an ExternalAccessory you should specify the protocol of the accessory in your info plist.

I did some more googling but couldn't find many mentions of com.apple.p1. The only place I could find was in this project on GitHub. However, I think this may be a case of Cargo Cult Programming.

Or maybe the protocols do something and I just wasn't able to see a difference in behavior.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top