ios detect accessories

Hi guys, I would like to know the attached devices via lighning cable.
After some research i found that i should use the EAAccessoryManager
Can someone help me out with this?
A very basic example would help a lot (plugged, unplugged alert with or without device name/id).

You could try iOSKit on github. By @Ulrich Bogun

Thank you, but I can’t find any class / example with accessories.
Maybe this one?

Thank you Jean-Paul, i have seen your comment in another topic, but I can’t implement it. Could you please do it for me? I would be really happy.

Note that EAAccessoryManager for one does NOT detect using an external keyboard via the iOS Simulator

Im not using simulator. I want to know if a random device is plugged into my ipad/phone or deattached.

Didn’t say you were or were not… just noting for you or anyone else that reads this topic, that this is a situation to be aware of