<!--
{
  "availability" : [
    "iOS: 27.2.0 -",
    "iPadOS: 27.2.0 -",
    "macCatalyst: 27.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeExtensions",
  "identifier" : "/documentation/HomeExtensions/HomeContentID",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "HomeExtensions"
    ],
    "preciseIdentifier" : "s:14HomeExtensions0A9ContentIDV"
  },
  "title" : "HomeContentID"
}
-->

# HomeContentID

An identifier for a piece of content that your extension provides.

```
struct HomeContentID
```

## Overview

Defining identifiers as constants, instead of using strings, lets you reuse them and avoid typos. For example:

```swift
extension HomeContentID {
    static let batteryGuide: HomeContentID = "battery-guide"
}

HomeAccessoryHelpGuide(id: .batteryGuide) {
    BatteryGuideView()
}
```

You can also use a string literal anywhere an identifier is expected.

## Topics

### Creating a content identifier

[`init(String)`](/documentation/HomeExtensions/HomeContentID/init(_:))

Creates an identifier from a string.

### Initializers

[`init(rawValue: String)`](/documentation/HomeExtensions/HomeContentID/init(rawValue:))

Creates an identifier with the given raw value.

[`init(stringLiteral: String)`](/documentation/HomeExtensions/HomeContentID/init(stringLiteral:))

Creates an identifier from a string literal.

### Instance Properties

[`var description: String`](/documentation/HomeExtensions/HomeContentID/description)

A textual representation of the identifier.

[`let rawValue: String`](/documentation/HomeExtensions/HomeContentID/rawValue)

The identifier’s string value.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`ExpressibleByExtendedGraphemeClusterLiteral`](/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

---

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)