# How to run a Build-Phase script when building a standalone Swift Package in Xcode?

**URL:** <https://forums.swift.org/t/how-to-run-a-build-phase-script-when-building-a-standalone-swift-package-in-xcode/40117>\
**Category:** Using Swift\
**Tags:** xcode, packagemanager\
**Created:** [September 8, 2020, 5:50pm UTC](https://forums.swift.org/t/how-to-run-a-build-phase-script-when-building-a-standalone-swift-package-in-xcode/40117 "2020-09-08T17:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Ben-xD](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Ben-xD](https://forums.swift.org/u/Ben-xD)\
**Post date:** [May 31, 2021, 1:23pm UTC](https://forums.swift.org/t/how-to-run-a-build-phase-script-when-building-a-standalone-swift-package-in-xcode/40117/8 "2021-05-31T13:23:19Z")

</div>

Just to be clear, we also can't add the swiftlint code to the scheme, under `Run > Pre-actions`?

 ![CleanShot 2021-05-31 at 13.41.47](https://global.discourse-cdn.com/swift/original/3X/2/d/2dfc16d4ff0d64015df7968380726062b0b2d104.png)

---

_[View the full topic](https://forums.swift.org/t/how-to-run-a-build-phase-script-when-building-a-standalone-swift-package-in-xcode/40117)._
