To listen to the route change events of AvAudioSession use the following observer. Now add the handler used in the #selector: Cheers and Peace out.
Official tutorial from WWDC: https://developer.apple.com/videos/play/wwdc2019/717/ Example of association file: The app id is combination of: Application Id + Application package identifier. You can find your appId against the identifier you have created on apple developer account. You also need to enable ‘Associated domains’ capability in your identifier settings from developer account. Detailed articles: Reddit association … Read more