<!--
{
  "availability" : [
    "iOS: 7.1.0 -",
    "iPadOS: 7.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.2 -",
    "tvOS: 7.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPRemoteCommand/removeTarget(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPRemoteCommand(im)removeTarget:"
  },
  "title" : "removeTarget(_:)"
}
-->

# removeTarget(_:)

Removes a target from the remote command object.

```
func removeTarget(_ target: Any?)
```

## Parameters

`target`

The object that currently is a recipient of action messages sent by this object. Specify `nil` to remove all targets.

## Discussion

Call the [`removeTarget(_:)`](/documentation/MediaPlayer/MPRemoteCommand/removeTarget(_:)) method to remove the specified target and all actions associated with the target.

---

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)