<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/NSCollectionViewAppIntentsDataSource/collectionView(_:appEntityIdentifierForItemAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents",
      "AppKit"
    ],
    "preciseIdentifier" : "s:012_AppIntents_A3Kit016NSCollectionViewaB10DataSourceP010collectionE0_28appEntityIdentifierForItemAt0aB00jK0VSgSo0dE0C_10Foundation9IndexPathVtF"
  },
  "title" : "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.

```
@MainActor func collectionView(_ collectionView: NSCollectionView, 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

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

## Discussion

For more information, refer to <doc:providing-contextual-cues-to-Apple-Intelligence-and-Siri> and
<doc://com.apple.documentation/documentation/AppIntents>.

---

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)