Type Property interruption Notification
Posted when an audio interruption occurs.
iOS 6.0+ Mac Catalyst 13.0+ Beta tvOS 9.0+ watchOS 2.0+ Discussion
dictionary of this notification contains the
user Info . If the interruption type is AVAudio Session Interruption Type Key , the app’s audio session has been interrupted and is no longer active. If the interruption type is AVAudio Session .Interruption Type .began , this dictionary also contains the AVAudio Session .Interruption Type .ended key. AVAudio Session Interruption Option Key
Responding to Interruptions in Media Playback Programming Guide for more information on using this notification.
This notification is posted on the main thread.
Starting in iOS 10, the system will deactivate the audio session of most apps in response to the app process being suspended. When the app starts running again, it will receive an interruption notification that its audio session has been deactivated by the system. This notification is necessarily delayed in time because it can only be delivered once the app is running again. If your app's audio session was suspended for this reason, the
dictionary will contain the
user Info key with a value of AVAudio Session Interruption Was Suspended Key
If your audio session is configured to be non-mixable (the default behavior for the
play And Record
categories), it's recommended that you deactivate your audio session if you're not actively using audio when you go into the background. Doing so will avoid having your audio session deactivated by the system (and receiving this somewhat confusing notification).
multi Route See Also Responding to Audio Session Notifications
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.
Learn more about using Apple's beta software