<!--
{
  "availability" : [
    "iOS: 14.0 -",
    "iPadOS: 14.0 -",
    "macCatalyst: 14.0 -",
    "macOS: 11.0 -",
    "tvOS: 14.0 -",
    "visionOS: 1.0 -",
    "watchOS: 7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeveloperToolsSupport",
  "identifier" : "/documentation/DeveloperToolsSupport",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "DeveloperToolsSupport"
    ],
    "preciseIdentifier" : "DeveloperToolsSupport"
  },
  "title" : "DeveloperToolsSupport"
}
-->

# DeveloperToolsSupport

Expose custom views and modifiers in the Xcode library.

## Overview

Using the DeveloperToolsSupport framework, you tell Xcode about your custom
SwiftUI views and view modifiers. After adding your views and modifiers, Xcode
makes them available to you when
you click the Library button (`+`) in Xcode’s toolbar. You can select and drag
the custom library items into code, just like you would for system-provided
items.

To add items to the library, create a structure that conforms to the
[`LibraryContentProvider`](/documentation/DeveloperToolsSupport/LibraryContentProvider) protocol and encapsulate any
items you want to add as [`LibraryItem`](/documentation/DeveloperToolsSupport/LibraryItem) instances.
Implement the [`views`](/documentation/DeveloperToolsSupport/LibraryContentProvider/views)
computed property to add library items containing views. Implement the
[`modifiers(base:)`](/documentation/DeveloperToolsSupport/LibraryContentProvider/modifiers(base:))
method to add items containing view modifiers.
Xcode harvests items from all of the library content providers in your project
as you work, and makes them available to you in its library.

## Topics

### Library customization

[`LibraryContentProvider`](/documentation/DeveloperToolsSupport/LibraryContentProvider)

A source of Xcode library and code completion content.

[`LibraryItem`](/documentation/DeveloperToolsSupport/LibraryItem)

A single item to add to the Xcode library.

### Preview definition

[`Preview`](/documentation/DeveloperToolsSupport/Preview)

A base type that preview macros use to create previews.

[`PreviewLayout`](/documentation/DeveloperToolsSupport/PreviewLayout)

A size constraint for a preview.

[`PreviewTrait`](/documentation/DeveloperToolsSupport/PreviewTrait)

Customizations that you can apply to a preview.

[`PreviewRegistry`](/documentation/DeveloperToolsSupport/PreviewRegistry)

A protocol that the system uses to locate previews at runtime.

### Preview camera management

[`PreviewCamera`](/documentation/DeveloperToolsSupport/PreviewCamera)

A camera that defines a viewpoint in a preview.

[`PreviewCameraBuilder`](/documentation/DeveloperToolsSupport/PreviewCameraBuilder)

A builder type that composes a collection of cameras for previewing a
view in a 3D scene.

### Resource definition

[`ColorResource`](/documentation/DeveloperToolsSupport/ColorResource)

A color resource.

[`ImageResource`](/documentation/DeveloperToolsSupport/ImageResource)

An image resource.



---

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)
