<!--
{
  "availability" : [
    "SwiftPM: 6.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Package/Dependency/Trait/condition-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription0A0C10DependencyC5TraitV9conditionAG9ConditionVSgvp"
  },
  "title" : "condition"
}
-->

# condition

The condition under which the package manager enables the dependency.

```
var condition: Package.Dependency.Trait.Condition?
```

---

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)