<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Target/Dependency/targetItem(name:condition:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription6TargetC10DependencyO10targetItemyAESS_AA0cD9ConditionVSgtcAEmF"
  },
  "title" : "Target.Dependency.targetItem(name:condition:)"
}
-->

# Target.Dependency.targetItem(name:condition:)

A dependency on a target.

```
case targetItem(name: String, condition: TargetDependencyCondition?)
```

## Parameters

`name`

The name of the target.

`condition`

A condition that limits the application of the target dependency. For example, only apply a dependency for a specific platform.

---

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)