Contents

requestUserAttention(_:)

Starts a user attention request.

Declaration

func requestUserAttention(_ requestType: NSApplication.RequestUserAttentionType) -> Int

Parameters

Return Value

The identifier for the request. You can use this value to cancel the request later using the cancelUserAttentionRequest(_:) method.

Discussion

Activating the app cancels the user attention request. A spoken notification will occur if spoken notifications are enabled. Sending requestUserAttention(_:) to an app that is already active has no effect.

If the inactive app presents a modal panel, this method will be invoked with NSCriticalRequest automatically. The modal panel is not brought to the front for an inactive app.

See Also

Managing user attention requests