<!--
{
  "availability" : [
    "SwiftPM: 5.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Target/binaryTarget(name:path:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription6TargetC06binaryC04name4pathACSS_SStFZ"
  },
  "title" : "binaryTarget(name:path:)"
}
-->

# binaryTarget(name:path:)

Creates a binary target that references an artifact on disk.

```
static func binaryTarget(name: String, path: String) -> Target
```

## Parameters

`name`

The name of the target.

`path`

The path to the binary artifact. This path can point directly to
a binary artifact or to an archive file that contains the binary
artifact at its root.

## Discussion

Binary targets are only available on Apple platforms.

---

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)