tags:

views:

28

answers:

1

Hi , in the documentation of EAAccessoryManager it says we need to add "Supported external accessory protocols" in the settings plist. But this can be done for known protocol strings, what if dont know the protocol string or string which are not in the list, if my application has to detect any arbitrary device which are "made for iPod" how to do that.

And also how to know the Protocol String of the Device ? Where to find this ?

Thanks

A: 

Hi, if you want retrieve the protocolString try this:

//Load all connected accessories
    NSMutableArray *_accessoryList = [[NSMutableArray alloc] initWithArray:[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]];
//Load attribute protocolString into NSString, note that the "objectAtIndex" is just to show the string on a UITableViewCell of a UITableView.
    NSString *eaAccessoryProtocolString = [[_accessoryList objectAtIndex:indexPath.row] protocolString];

In the Info.plist you have to add the protocol that the devices implement and it must be the same of the application. In this case you need to contact manufacturer, otherwise you have to apply the MFi/WWi license and than you can define your own protocols, like Data schema for sent and revive data to and from external devices.

Hope this is useful.

Mat
Yes this again requires us to specify atleast some protocol string , but is there any universal string which can accept any device connected ?
RVN