<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeveloperToolsSupport",
  "identifier" : "/documentation/DeveloperToolsSupport/LibraryItem/init(_:visible:title:category:matchingSignature:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "DeveloperToolsSupport"
    ],
    "preciseIdentifier" : "s:21DeveloperToolsSupport11LibraryItemV_7visible5title8category17matchingSignatureACxyXK_SbSSSgAC8CategoryVAHtclufc"
  },
  "title" : "init(_:visible:title:category:matchingSignature:)"
}
-->

# init(_:visible:title:category:matchingSignature:)

Creates a new library item.

```
init<SnippetExpressionType>(_ snippet: @autoclosure () -> SnippetExpressionType, visible: Bool = true, title: String? = nil, category: LibraryItem.Category = .other, matchingSignature: String? = nil)
```

## Parameters

`snippet`

The expression to insert when the user picks the item
from the library, or inserts it via code completion.

`visible`

A Boolean that specifies whether to make this item visible in the
library. You might choose to hide an item from the library if its only
purpose is to support code completion.

`title`

A title for the item in the library.
If unspecified, Xcode generates a default title.

`category`

A category for the item in the library.
If unspecified, Xcode assumes the default category of “Other”.

`matchingSignature`

An overload for which the item presents its code
completion. You typically use this parameter when setting up an item as a
source of custom code completion. At the time of completion, the code
completion engine looks for an item matching the signature and
inserts its completion, if found.

---

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)