Contents

setPrefersNoInterruptionsFromSystemAlerts(_:)

Sets the preference for not interrupting the audio session with system alerts.

Declaration

func setPrefersNoInterruptionsFromSystemAlerts(_ inValue: Bool) throws

Parameters

  • inValue:

    The interruption preference value.

Mentioned in

Discussion

Beginning in iOS 14, users can set a global preference that indicates whether the system displays incoming calls using a banner or a full-screen display style. If using the banner style, setting this value to true prevents the system from interrupting the audio session with incoming call notifications, and gives the user an opportunity to accept or decline the call. The system only interrupts the audio session if the user accepts the call.

Enabling this preference can improve the user experience of apps with audio sessions that you don’t want to interrupt, such as those that record audiovisual media or that you use for music performance.

See Also

Handling interruptions