---
title: finish()
framework: realitykit
role: symbol
role_heading: Instance Method
path: realitykit/objectcapturesession/finish()
---

# finish()

Requests that the capture session be stopped and all data saved.

## Declaration

```swift
@MainActor func finish()
```

## Discussion

Discussion Call this method when the user has completed the scan successfully.  The session switches to state .finishing while it saves all data and ultimately switches the state to .completed. The session ignores this method call if the current state is any value other than .capturing.

## See Also

### Controlling the session

- [cancel()](realitykit/objectcapturesession/cancel().md)
- [pause()](realitykit/objectcapturesession/pause().md)
- [requestImageCapture()](realitykit/objectcapturesession/requestimagecapture().md)
- [resume()](realitykit/objectcapturesession/resume().md)
- [startCapturing()](realitykit/objectcapturesession/startcapturing().md)
