<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaDevice",
  "identifier" : "/documentation/MediaDevice/MediaDeviceExtension/sendData(_:toApplication:session:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Device"
    ],
    "preciseIdentifier" : "s:11MediaDevice0aB9ExtensionP8sendData_13toApplication7sessiony10Foundation0E0V_SSAA0A13OutputSessionCtF"
  },
  "title" : "sendData(_:toApplication:session:)"
}
-->

# sendData(_:toApplication:session:)

Called when an app sends data to a remote application.

```
@MainActor func sendData(_ data: Data, toApplication applicationIdentifier: String, session: MediaOutputSession)
```

## Parameters

`data`

The data to send to the remote application.

`applicationIdentifier`

The identifier of the target application.

`session`

The session associated with the data transfer.

## Discussion

In the case of media-app to remote media-application communication,
the media-application’s specific application identifier will be used.

In the case of media-app to media device extension communication,
the following application identifier will be used: `com.apple.media-device-extension`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)