---
title: identifier
framework: usernotifications
role: symbol
role_heading: Instance Property
path: usernotifications/unnotificationrequest/identifier
---

# identifier

The unique identifier for this notification request.

## Declaration

```swift
var identifier: String { get }
```

## Discussion

Discussion Use this string to identify notifications in your app. For example, you can pass this string to the removePendingNotificationRequests(withIdentifiers:) method to cancel a previously scheduled notification. If you use the same identifier when scheduling a new notification, the system removes the previously scheduled notification with that identifier and replaces it with the new one. For local notifications, the system sets this property to the value passed to the request’s initializer (see the init(identifier:content:trigger:) method). For remote notifications, the system sets this property to the value of the apns-collapse-id key that you specified in the APNs request header when generating the remote notification. If your app doesn’t set a value, the system automatically assigns an identifier.

## See Also

### Getting the Request Details

- [content](usernotifications/unnotificationrequest/content.md)
- [trigger](usernotifications/unnotificationrequest/trigger.md)
