---
title: LayerHierarchyHandle
framework: browserenginekit
role: symbol
role_heading: Class
path: browserenginekit/layerhierarchyhandle
---

# LayerHierarchyHandle

A reference to a layer hierarchy that your app shares between processes.

## Declaration

```swift
class LayerHierarchyHandle
```

## Mentioned in

Hosting browser view layers in the rendering extension

## Overview

Overview By sharing a reference, or handle, to your app’s layer hierarchy between processes, you can coordinate layer updates across multiple processes. Get a handle from a LayerHierarchy object, then share it with another process using one of the serialization methods. Use createXPCRepresentation() and init(xpcRepresentation:) to share layer handles across your app’s processes. Apps with existing Mach-based interprocess communication implementations can use encode(_:) and init(port:data:) methods to share layer handles. For more information, see Hosting browser view layers in the rendering extension.

## Topics

### Sharing a layer hierarchy handle using XPC

- [createXPCRepresentation()](browserenginekit/layerhierarchyhandle/createxpcrepresentation().md)
- [init(xpcRepresentation:)](browserenginekit/layerhierarchyhandle/init(xpcrepresentation:).md)

### Sharing a layer hierarchy handle using Mach

- [encode(_:)](browserenginekit/layerhierarchyhandle/encode(_:).md)
- [init(port:data:)](browserenginekit/layerhierarchyhandle/init(port:data:).md)

### Creating a layer hierarchy handle

- [init(coder:)](browserenginekit/layerhierarchyhandle/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Layer hosting

- [Hosting browser view layers in the rendering extension](browserenginekit/hosting-browser-view-layers-in-the-rendering-extension.md)
- [LayerHierarchy](browserenginekit/layerhierarchy.md)
- [LayerHierarchyHostingView](browserenginekit/layerhierarchyhostingview.md)
- [LayerHierarchyHostingTransactionCoordinator](browserenginekit/layerhierarchyhostingtransactioncoordinator.md)
