Posted when the media server restarts.
SDKs
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- AVFoundation
Declaration
const NSNotification Name AVAudioSessionMediaServicesWereResetNotification;
Discussion
Under rare circumstances, the system terminates and restarts its media services daemon. Respond to these events by reinitializing your app’s audio objects (such as players, recorders, converters, or audio queues) and resetting your audio session category, options, and mode configuration. Your app should not restart its media playback, recording, or processing until initiated by user action.
This notification has no user
dictionary.
This notification is posted on the main thread.
Important
Apps do not need to re-register for any audio session notifications or reset key-value observers on audio session properties after a media services reset.
Note
You can trigger a media server crash and restart by choosing the "Reset Media Services" selection under the Developer menu in Settings. Using this utility makes it easy for you to ensure your app responds appropriately if media services were reset.