---
title: "device(_:didEjectWithError:)"
framework: imagecapturecore
role: symbol
role_heading: Instance Method
path: "imagecapturecore/icdevicedelegate/device(_:didejectwitherror:)"
---

# device(_:didEjectWithError:)

Tells the delegate when the ejection is complete.

## Declaration

```swift
optional func device(_ device: ICDevice, didEjectWithError error: (any Error)?)
```

## Discussion

Discussion Execution of the delegate callback occurs on the main thread.

## See Also

### Responding to Device Events

- [device(_:didOpenSessionWithError:)](imagecapturecore/icdevicedelegate/device(_:didopensessionwitherror:).md)
- [device(_:didCloseSessionWithError:)](imagecapturecore/icdevicedelegate/device(_:didclosesessionwitherror:).md)
- [didRemove(_:)](imagecapturecore/icdevicedelegate/didremove(_:).md)
- [deviceDidBecomeReady(_:)](imagecapturecore/icdevicedelegate/devicedidbecomeready(_:).md)
- [device(_:didReceiveStatusInformation:)](imagecapturecore/icdevicedelegate/device(_:didreceivestatusinformation:).md)
- [device(_:didEncounterError:)](imagecapturecore/icdevicedelegate/device(_:didencountererror:).md)
