---
title: AlertingContext
framework: accessorynotifications
role: symbol
role_heading: Structure
path: accessorynotifications/alertingcontext
---

# AlertingContext

A structure that provides guidance for how to alert for a notification.

## Declaration

```swift
struct AlertingContext
```

## Overview

Overview To alert for a notification, present it on screen, play a sound, or trigger a haptic effect that uses touch to give users feedback.

## Topics

### Creating an alerting context

- [init(notificationCanAlert:suppressedByFocus:kind:sound:)](accessorynotifications/alertingcontext/init(notificationcanalert:suppressedbyfocus:kind:sound:).md)

### Determining alerting behavior

- [shouldAlert](accessorynotifications/alertingcontext/shouldalert.md)
- [notificationCanAlert](accessorynotifications/alertingcontext/notificationcanalert.md)
- [isSuppressedByFocus](accessorynotifications/alertingcontext/issuppressedbyfocus.md)

### Classifying the notification type

- [kind](accessorynotifications/alertingcontext/kind-swift.property.md)
- [AlertingContext.Kind](accessorynotifications/alertingcontext/kind-swift.enum.md)

### Configuring notification sound

- [sound](accessorynotifications/alertingcontext/sound-swift.property.md)
- [AlertingContext.Sound](accessorynotifications/alertingcontext/sound-swift.struct.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)

## See Also

### Data curation and alerting

- [AccessoryNotification](accessorynotifications/accessorynotification.md)
