<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySession/Output",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21PhotogrammetrySessionC6OutputO"
  },
  "title" : "PhotogrammetrySession.Output"
}
-->

# PhotogrammetrySession.Output

Status updates on the object-creation process.

```
enum Output
```

## Overview

RealityKit’s Object Capture is a long-running background task. The session publishes
messages status and error messages to [`outputs`](/documentation/RealityKit/PhotogrammetrySession/outputs-swift.property),
a Swift <doc://com.apple.documentation/documentation/Swift/AsyncSequence>.

Your app can respond to these updates using a `for`-`await`-`in` loop inside of a
`Task`, as this example demonstrates.

```swift
let waiter = Task {
    do {
        for try await output in session.outputs {
            switch output {
                case .processingComplete:
                    // RealityKit has processed all requests.
                case .requestError(let request, let error):
                    // Request encountered an error.
                case .requestComplete(let request, let result):
                    // RealityKit has finished processing a request.
                case .requestProgress(let request, let fractionComplete):
                    // Periodic progress update. Update UI here.
                case requestProgressInfo(let request, let progressInfo):
                    // Periodic progress info update.
                case .inputComplete:
                    // Ingestion of images is complete and processing begins.
                case .invalidSample(let id, let reason):
                    // RealityKit deemed a sample invalid and didn't use it.
                case .skippedSample(let id):
                    // RealityKit was unable to use a provided sample.
                case .automaticDownsampling:
                    // RealityKit downsampled the input images because of
                    // resource constraints.
                case .processingCancelled
                    // Processing was canceled.
                @unknown default:
                    // Unrecognized output.
            }
        }
    } catch {
        print("Output: ERROR = \(String(describing: error))")
        // Handle error.
    }
}
```

## Topics

### Monitoring session status

[`case inputComplete`](/documentation/RealityKit/PhotogrammetrySession/Output/inputComplete)

The data ingestion portion of the process is complete.

[`case processingComplete`](/documentation/RealityKit/PhotogrammetrySession/Output/processingComplete)

The session completed a request successfully.

[`case processingCancelled`](/documentation/RealityKit/PhotogrammetrySession/Output/processingCancelled)

All pending requests are canceled.

### Monitoring request status

[`case requestProgress(PhotogrammetrySession.Request, fractionComplete: Double)`](/documentation/RealityKit/PhotogrammetrySession/Output/requestProgress(_:fractionComplete:))

A progress update provided by the session.

[`case requestComplete(PhotogrammetrySession.Request, PhotogrammetrySession.Result)`](/documentation/RealityKit/PhotogrammetrySession/Output/requestComplete(_:_:))

The session finished handling all pending requests.

[`case requestError(PhotogrammetrySession.Request, any Error)`](/documentation/RealityKit/PhotogrammetrySession/Output/requestError(_:_:))

The session aborted a request due to an error.

### Monitoring data ingestion

[`case invalidSample(id: Int, reason: String)`](/documentation/RealityKit/PhotogrammetrySession/Output/invalidSample(id:reason:))

A provided sample was invalid.

[`case automaticDownsampling`](/documentation/RealityKit/PhotogrammetrySession/Output/automaticDownsampling)

The session reduced the image size because of memory constraints.

[`case skippedSample(id: Int)`](/documentation/RealityKit/PhotogrammetrySession/Output/skippedSample(id:))

The type of element used for Object Capture updates.
The [`PhotogrammetrySample`](/documentation/RealityKit/PhotogrammetrySample) with the [`id`](/documentation/RealityKit/PhotogrammetrySample/id) indicated was not able to be used for reconstruction.

### Describing updates

[`var localizedDescription: String`](/documentation/RealityKit/PhotogrammetrySession/Output/localizedDescription)

Localized string containing any extra information about the message, such as the reason
why a sample is invalid.

### Iterating outputs

[`struct Outputs`](/documentation/RealityKit/PhotogrammetrySession/Outputs-swift.struct)

An asynchronous sequence of session-related updates.

### Structures

[`struct ProgressInfo`](/documentation/RealityKit/PhotogrammetrySession/Output/ProgressInfo)

ProgressInfo includes the estimated remaining time and the progress stage during reconstruction.

### Enumeration Cases

[`case requestProgressInfo(PhotogrammetrySession.Request, PhotogrammetrySession.Output.ProgressInfo)`](/documentation/RealityKit/PhotogrammetrySession/Output/requestProgressInfo(_:_:))

[`case stitchingIncomplete`](/documentation/RealityKit/PhotogrammetrySession/Output/stitchingIncomplete)

The session reconstruction could not fully stitch all images of the object.

### Enumerations

[`enum ProcessingStage`](/documentation/RealityKit/PhotogrammetrySession/Output/ProcessingStage)

Processing stages during reconstruction.

## Relationships

### Conforms To

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

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

---

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)