<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewDiffableDataSourceReferenceItemProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSCollectionViewDiffableDataSourceItemProvider"
  },
  "title" : "NSCollectionViewDiffableDataSourceReferenceItemProvider"
}
-->

# NSCollectionViewDiffableDataSourceReferenceItemProvider

A closure that configures and returns an item for a collection view from its diffable data source.

```
typealias NSCollectionViewDiffableDataSourceReferenceItemProvider = (NSCollectionView, IndexPath, Any) -> NSCollectionViewItem?
```

## Parameters

`collectionView`

The collection view to configure this item for.

`indexPath`

The index path that specifies the location of the item in the collection view.

`itemIdentifier`

The identifier of the data item for this item.

## Return Value

A non-`nil` configured item object. The item provider must return a valid item object to the collection view.

---

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)