<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCLiteralValue",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC15XPCLiteralValueV"
  },
  "title" : "XPCLiteralValue"
}
-->

# XPCLiteralValue

A type that bridges Swift literal values to XPC objects for use in dictionary literals.

```
struct XPCLiteralValue
```

## Overview

This type enables ergonomic dictionary literal syntax:

```swift
let dict: XPCDictionary = [
    "name": "John",
    "age": 30,
    "isActive": true,
    "score": 95.5
]
```

## Topics

### Initializers

[`init<T>(T)`](/documentation/XPC/XPCLiteralValue/init(_:)-1dqub)

Creates an XPCLiteralValue from a signed integer.

[`init(String)`](/documentation/XPC/XPCLiteralValue/init(_:)-1iznz)

Creates an XPCLiteralValue from a String.

[`init(xpc_object_t)`](/documentation/XPC/XPCLiteralValue/init(_:)-381hb)

Creates an XPCLiteralValue from an xpc_object_t.

[`init(Bool)`](/documentation/XPC/XPCLiteralValue/init(_:)-75v42)

Creates an XPCLiteralValue from a Bool.

[`init<T>(T)`](/documentation/XPC/XPCLiteralValue/init(_:)-89roz)

Creates an XPCLiteralValue from a floating-point number.

[`init(XPCDictionary)`](/documentation/XPC/XPCLiteralValue/init(_:)-98a24)

Creates an XPCLiteralValue from an XPCDictionary.

[`init<T>(T)`](/documentation/XPC/XPCLiteralValue/init(_:)-nb1u)

Creates an XPCLiteralValue from an unsigned integer.

## Relationships

### Conforms To

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

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

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

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

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

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

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

[`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)