---
title: mainTarget
framework: swift-package-manager
role: symbol
role_heading: Instance Property
path: swift-package-manager/documentation/packageplugin/executableproduct/maintarget
---

# mainTarget

The target that contains the main entry point of the executable.

## Declaration

```swift
let mainTarget: any Target
```

## Discussion

Discussion Every executable product has exactly one main executable target. This target will always be one of the targets in the product’s targets array.

## See Also

### Inspecting an Executable Target

- [id](swift-package-manager/documentation/packageplugin/executableproduct/id.md)
- [name](swift-package-manager/documentation/packageplugin/executableproduct/name.md)
- [targets](swift-package-manager/documentation/packageplugin/executableproduct/targets.md)
