---
title: "cameraSnapshotControl(_:didTake:error:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmcamerasnapshotcontroldelegate/camerasnapshotcontrol(_:didtake:error:)"
---

# cameraSnapshotControl(_:didTake:error:)

Tells the delegate that the camera has taken a new snapshot.

## Declaration

```swift
optional func cameraSnapshotControl(_ cameraSnapshotControl: HMCameraSnapshotControl, didTake snapshot: HMCameraSnapshot?, error: (any Error)?)
```

## Parameters

- `cameraSnapshotControl`: The camera snapshot control responsible for the new snapshot.
- `snapshot`: The snapshot taken by the camera. nil if there was a problem.
- `error`: An error that is populated if there was a problem taking the snapshot; nil otherwise.

## See Also

### Observing snapshot activity

- [cameraSnapshotControlDidUpdateMostRecentSnapshot(_:)](homekit/hmcamerasnapshotcontroldelegate/camerasnapshotcontroldidupdatemostrecentsnapshot(_:).md)
