---
title: requestCloseSession()
framework: imagecapturecore
role: symbol
role_heading: Instance Method
path: imagecapturecore/icdevice/requestclosesession()
---

# requestCloseSession()

Requests to close an open session on the device.

## Declaration

```swift
func requestCloseSession()
```

## Discussion

Discussion Once the request to close the session has completed, device(_:didCloseSessionWithError:) is called on the delegate. Execution of the delegate callback occurs on the main thread.

## See Also

### Managing a Device

- [delegate](imagecapturecore/icdevice/delegate.md)
- [ICDeviceDelegate](imagecapturecore/icdevicedelegate.md)
- [hasOpenSession](imagecapturecore/icdevice/hasopensession.md)
- [requestOpenSession()](imagecapturecore/icdevice/requestopensession().md)
- [requestOpenSession(options:completion:)](imagecapturecore/icdevice/requestopensession(options:completion:).md)
- [requestSendMessage(_:outData:maxReturnedDataSize:sendMessageDelegate:didSendMessageSelector:contextInfo:)](imagecapturecore/icdevice/requestsendmessage(_:outdata:maxreturneddatasize:sendmessagedelegate:didsendmessageselector:contextinfo:).md)
- [requestCloseSession(options:completion:)](imagecapturecore/icdevice/requestclosesession(options:completion:).md)
- [requestEject()](imagecapturecore/icdevice/requesteject().md)
- [requestEject(completion:)](imagecapturecore/icdevice/requesteject(completion:).md)
