<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RoomPlan",
  "identifier" : "/documentation/RoomPlan/CapturedRoomData",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RoomPlan"
    ],
    "preciseIdentifier" : "s:8RoomPlan08CapturedA4DataV"
  },
  "title" : "CapturedRoomData"
}
-->

# CapturedRoomData

An opaque object that holds the raw results of a scan.

```
struct CapturedRoomData
```

## Overview

When your app completes a scan session by calling [`stop()`](/documentation/RoomPlan/RoomCaptureSession/stop()), the framework provides your app with raw scan results in one of the following ways:

- The [`captureView(shouldPresent:error:)`](/documentation/RoomPlan/RoomCaptureViewDelegate/captureView(shouldPresent:error:)) callback for an app that scans rooms using the framework-provided view ([`RoomCaptureView`](/documentation/RoomPlan/RoomCaptureView))
- The [`captureSession(_:didEndWith:error:)`](/documentation/RoomPlan/RoomCaptureSessionDelegate/captureSession(_:didEndWith:error:)) callback for an app that implements its own room-scanning view

With an instance of this structure, your app can:

- Process the raw data into a detailed captured room object ([`CapturedRoom`](/documentation/RoomPlan/CapturedRoom)) by creating a room builder ([`RoomBuilder`](/documentation/RoomPlan/RoomBuilder)) and calling its [`capturedRoom(from:)`](/documentation/RoomPlan/RoomBuilder/capturedRoom(from:)) function.
- Serialize to an encoder object, for example, to defer processing to a later date or to defer processing to another device.

## Topics

### Deserializing a prior scan

[`init(from:)`](/documentation/RoomPlan/CapturedRoomData/init(from:))

Creates captured room data by deserializing the decoder of a prior scan.

### Serializing a prior scan

[`encode(to:)`](/documentation/RoomPlan/CapturedRoomData/encode(to:))

Serializes captured room data to the specified encoder.

## Relationships

### Conforms To

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

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

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

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

---

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)