---
title: "associateAppEntity(_:priority:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/cssearchableitem/associateappentity(_:priority:)-736lx"
---

# associateAppEntity(_:priority:)

Associates an app entity with this searchable item.

## Declaration

```swift
func associateAppEntity(_ appEntity: some IndexedEntity, priority: Int = 0)
```

## Parameters

- `appEntity`: The app entity that will be associated with this searchable item.
- `priority`: The importance of this item compared to the other donated items.

## See Also

### Associating an entity with an item

- [associateAppEntity(_:priority:)](corespotlight/cssearchableitem/associateappentity(_:priority:)-6h7ym.md)
- [relatedAppEntityIdentifier](corespotlight/cssearchableitem/relatedappentityidentifier.md)
