Get input of switch control via headphone jack on iOS : <p>As a little holiday project I want to control an app via an accessibility switch which is connected via 3,5mm headphone jack to the iOS device.</p>

<p>This is the switch and the plug:<a href="https://i.stack.imgur.com/63hTl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/63hTl.png" alt="enter image description here"></a></p>

<p>My problem is that I don't have any clue what kind of signal is fired when I press the button - I assumed that it acts similar to a headphone's remote control.</p>

<p>Is there a way to measure the input of this or does anybody know how to get the input of the button on iOS?</p>
