---
title: "collectionView(_:appEntityIdentifierForItemAt:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/uicollectionviewappintentsdatasource/collectionview(_:appentityidentifierforitemat:)"
---

# collectionView(_:appEntityIdentifierForItemAt:)

Asks the data source to return an app entity identifier for a cell at a particular location in the collection view.

## Declaration

```swift
@MainActor func collectionView(_ collectionView: UICollectionView, appEntityIdentifierForItemAt indexPath: IndexPath) -> EntityIdentifier?
```

## Parameters

- `collectionView`: The collection view asking for the app entity identifier.
- `indexPath`: The index path that specifies the section and item number in the collection view.

## Return Value

Return Value The app entity identifier at the specified location in the collection view.

## Discussion

Discussion For more information, refer to doc:Making-onscreen-content-available-to-siri-and-apple-intelligence and App Intents.
