Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out if an external headset is connected to an iPhone?

Is it possible to detect that the user has an external headset plugged into the iPhone's 3.5mm connector or the 30-pin connector? I want to output audio only to an external audio device, and keep silent if nothing is connected.

like image 506
iter Avatar asked Nov 01 '25 19:11

iter


1 Answers

The answer is very similar to the answer to this question, but you'll want to get the kAudioSessionProperty_AudioRoute property instead.

like image 65
Chuck Avatar answered Nov 03 '25 10:11

Chuck



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!