---
title: targets
framework: swift-package-manager
role: symbol
role_heading: Instance Property
path: swift-package-manager/documentation/packageplugin/product/targets
---

# targets

The targets that directly comprise the product, in the order in which they are declared in the package manifest.

## Declaration

```swift
var targets: [any Target] { get }
```

## Discussion

Discussion The product contains the transitive closure of the these targets and their dependencies. Some kinds of products have further restrictions on the set of targets (for example, an executable product must have one and only one target that defines the main entry point for an executable).

## See Also

### Inspecting a Package Product

- [id](swift-package-manager/documentation/packageplugin/product/id-swift.property.md)
- [name](swift-package-manager/documentation/packageplugin/product/name.md)
- [sourceModules](swift-package-manager/documentation/packageplugin/product/sourcemodules.md)
- [Product.ID](swift-package-manager/documentation/packageplugin/product/id-swift.typealias.md)
