<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "s:SC11UNErrorCodeLeV"
  },
  "title" : "UNError"
}
-->

# UNError

An object that represents a notification error.

```
struct UNError
```

## Topics

### Type Properties

[`notificationsNotAllowed`](/documentation/UserNotifications/UNError/notificationsNotAllowed)

Notifications are not allowed.

[`attachmentInvalidURL`](/documentation/UserNotifications/UNError/attachmentInvalidURL)

The URL for an attachment was invalid.

[`attachmentUnrecognizedType`](/documentation/UserNotifications/UNError/attachmentUnrecognizedType)

The file type of an attachment is not supported.

[`attachmentInvalidFileSize`](/documentation/UserNotifications/UNError/attachmentInvalidFileSize)

An attachment is too large.

[`attachmentNotInDataStore`](/documentation/UserNotifications/UNError/attachmentNotInDataStore)

The specified attachment is not in the system data store.

[`attachmentMoveIntoDataStoreFailed`](/documentation/UserNotifications/UNError/attachmentMoveIntoDataStoreFailed)

An error occurred when trying to move an attachment to the system data store.

[`attachmentCorrupt`](/documentation/UserNotifications/UNError/attachmentCorrupt)

The file for an attachment is corrupt.

[`notificationInvalidNoDate`](/documentation/UserNotifications/UNError/notificationInvalidNoDate)

The notification does not have an associated date, but should.

[`notificationInvalidNoContent`](/documentation/UserNotifications/UNError/notificationInvalidNoContent)

The notification has no user-facing content, but should.

[`contentProvidingInvalid`](/documentation/UserNotifications/UNError/contentProvidingInvalid)

[`contentProvidingObjectNotAllowed`](/documentation/UserNotifications/UNError/contentProvidingObjectNotAllowed)

[`badgeInputInvalid`](/documentation/UserNotifications/UNError/badgeInputInvalid)

### Error Information

[`errorDomain`](/documentation/UserNotifications/UNError/errorDomain)

[`UNErrorDomain`](/documentation/UserNotifications/UNErrorDomain)

The error domain for notifications.

[`UNError.Code`](/documentation/UserNotifications/UNError/Code)

Constants that identify notification errors.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)