The UIResponder has a -remoteControlReceivedWithEvent: method, which you can use to receive events from external devices, possibly including Bluetooth headsets. From the docs:
Remote control events occur in the form of commands from external accessories, including headsets. The application responds to these commands by controlling the audio or video content presented to the user. The receiving responder object must examine the event subtype to determine the intended command, for example play (UIEventSubtypeRemoteControlPlay), and then act accordingly.
To ensure the delivery of remote control events, you must call the beginReceivingRemoteControlEvents method for UIApplication; to disable remote control event delivery, call endReceivingRemoteControlEvents.
It is unclear whether the answer / end button on the headset is equivalent to a play / pause button, such as a headphone console, but it might be worth a try.
source share