---
title: ptpEventHandler
framework: imagecapturecore
role: symbol
role_heading: Instance Property
path: imagecapturecore/iccameradevice/ptpeventhandler
---

# ptpEventHandler

A closure for handling PTP event packets.

## Declaration

```swift
var ptpEventHandler: (Data) -> Void { get set }
```

## Discussion

Discussion Set this property as an alternative to setting up an object to handle PTP event packets. If the handler is set, it is called in place of the delegate. If the handler is nil, the delegate is called, if present. If both are set, only the handler is called.

## See Also

### Taking Pictures

- [tetheredCaptureEnabled](imagecapturecore/iccameradevice/tetheredcaptureenabled.md)
- [requestEnableTethering()](imagecapturecore/iccameradevice/requestenabletethering().md)
- [requestTakePicture()](imagecapturecore/iccameradevice/requesttakepicture().md)
- [requestSendPTPCommand(_:outData:sendCommandDelegate:didSendCommand:contextInfo:)](imagecapturecore/iccameradevice/requestsendptpcommand(_:outdata:sendcommanddelegate:didsendcommand:contextinfo:).md)
- [requestSendPTPCommand(_:outData:completion:)](imagecapturecore/iccameradevice/requestsendptpcommand(_:outdata:completion:).md)
- [requestDisableTethering()](imagecapturecore/iccameradevice/requestdisabletethering().md)
