How to add audio device action sheet to your iOS app

audio devices action sheet from Callkit

When developing an app with music, video, call functions, it always comes up this requirement:

How to select a desired audio device

Like the above image, it’s from CallKit where you can select the desired audio output from this action sheet.

First, we have to understand how many audio routes and how they switch. We will be…