---
title: "requestSendPTPCommand(_:outData:sendCommandDelegate:didSendCommand:contextInfo:)"
framework: imagecapturecore
role: symbol
role_heading: Instance Method
path: "imagecapturecore/iccameradevice/requestsendptpcommand(_:outdata:sendcommanddelegate:didsendcommand:contextinfo:)"
---

# requestSendPTPCommand(_:outData:sendCommandDelegate:didSendCommand:contextInfo:)

Sends a Picture Transfer Protocol (PTP) command to a camera asynchronously.

## Declaration

```swift
func requestSendPTPCommand(_ command: Data, outData data: Data?, sendCommandDelegate: Any, didSendCommand selector: Selector, contextInfo: UnsafeMutableRawPointer?)
```

## Discussion

Discussion Call this method only if the capabilities property contains cameraDeviceCanAcceptPTPCommands. All PTP cameras have this capability. The sendCommandDelegate must implement a function with the signature - (void)didSendPTPCommand:(NSData*)command inData:(NSData*)data response:(NSData*)response error:(NSError*)error contextInfo:(void*)contextInfo, to be called when the request is completed.

## See Also

### Taking Pictures

- [tetheredCaptureEnabled](imagecapturecore/iccameradevice/tetheredcaptureenabled.md)
- [ptpEventHandler](imagecapturecore/iccameradevice/ptpeventhandler.md)
- [requestEnableTethering()](imagecapturecore/iccameradevice/requestenabletethering().md)
- [requestTakePicture()](imagecapturecore/iccameradevice/requesttakepicture().md)
- [requestSendPTPCommand(_:outData:completion:)](imagecapturecore/iccameradevice/requestsendptpcommand(_:outdata:completion:).md)
- [requestDisableTethering()](imagecapturecore/iccameradevice/requestdisabletethering().md)
