# Relationship between swift-build, xcodebuild, and Xcode

**URL:** <https://forums.swift.org/t/relationship-between-swift-build-xcodebuild-and-xcode/77609>\
**Category:** Swift Build\
**Created:** [February 2, 2025, 5:48am UTC](https://forums.swift.org/t/relationship-between-swift-build-xcodebuild-and-xcode/77609 "2025-02-02T05:48:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ethanc8](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ethanc8/32/36660_2.png) [@ethanc8](https://forums.swift.org/u/ethanc8)\
**Post date:** [February 2, 2025, 6:14am UTC](https://forums.swift.org/t/relationship-between-swift-build-xcodebuild-and-xcode/77609/3 "2025-02-02T06:14:48Z")

</div>

> [@jakepetroules](#):
>
> So to answer your question: yes, you could use `swbuild` to build an Xcode project, but you'd first need to convert it to PIF using `xcodebuild`. There are some examples in the Swift Build codebase of how to invoke xcodebuild to do so. But I'd like to stress that this is not an intended use case outside of debugging, and end users _should_ be using `swift-build` (from SwiftPM) or xcodebuild to perform command line builds of their projects.

By this, do you mean that `swift-build` (of SwiftPM) would build SwiftPM projects and that `xcodebuild` would build Xcode projects? Or can `swift-build` also build Xcode projects?

> [@jakepetroules](#):
>
> Instead, Swift Build uses an internal project representation called "PIF".

Do the higher-level clients store the PIF representation on disk, or is it stored only in memory?

---

_[View the full topic](https://forums.swift.org/t/relationship-between-swift-build-xcodebuild-and-xcode/77609)._
