<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouchBarDelegate/touchBar(_:makeItemForIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTouchBarDelegate(im)touchBar:makeItemForIdentifier:"
  },
  "title" : "touchBar(_:makeItemForIdentifier:)"
}
-->

# touchBar(_:makeItemForIdentifier:)

Asks the delegate object for the bar item for the specified bar and item identifier.

```
@MainActor optional func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem?
```

## Parameters

`touchBar`

The bar that’s requesting the bar item.

`identifier`

The item identifier associated with the item being requested.

## Return Value

A fully initialized bar item for the specified bar and identifier.

## Discussion

When the system needs to populate a bar’s items array, the system calls this delegate method to retrieve an item if that item can’t be found in the bar’s private array or in the bar’s [`templateItems`](/documentation/AppKit/NSTouchBar/templateItems) property.

---

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)