---
title: uniqueIdentifier
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/cssearchableitem/uniqueidentifier
---

# uniqueIdentifier

The value that uniquely identifies the searchable item within your app.

## Declaration

```swift
var uniqueIdentifier: String { get set }
```

## Discussion

Discussion This property is required because it’s the only way to identify searchable items in the index when you need to access or delete them. When you create a searchable item, the system generates a UUID by default, but you can replace the default value with a unique identifier that makes sense in the context of your app. If you want to use a custom value for uniqueIdentifier, be sure to set it before the item is indexed for the first time.

## See Also

### Setting attributes on a searchable item

- [domainIdentifier](corespotlight/cssearchableitem/domainidentifier.md)
- [attributeSet](corespotlight/cssearchableitem/attributeset.md)
- [expirationDate](corespotlight/cssearchableitem/expirationdate.md)
- [isUpdate](corespotlight/cssearchableitem/isupdate.md)
- [updateListenerOptions](corespotlight/cssearchableitem/updatelisteneroptions-swift.property.md)
- [CSSearchableItem.UpdateListenerOptions](corespotlight/cssearchableitem/updatelisteneroptions-swift.struct.md)
