Getting automatic detection information from Airpods pro/max

207 Views Asked by At

Is it possible to get the information of automatic detection (when ear/head-phones are put/removed)?

If so, how can it be done?

1

There are 1 best solutions below

0
On BEST ANSWER

Observe the notification AVAudioSession.routeChangeNotification. For full details (including how to properly respond to this notification), see Responding to Audio Session Route Changes.