# Xcode Project targets as containers for Swift Macros (and Plugins)

**URL:** <https://forums.swift.org/t/xcode-project-targets-as-containers-for-swift-macros-and-plugins/66226>\
**Category:** Using Swift\
**Tags:** macros, plugins\
**Created:** [July 18, 2023, 1:12pm UTC](https://forums.swift.org/t/xcode-project-targets-as-containers-for-swift-macros-and-plugins/66226 "2023-07-18T13:12:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepicrft](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/pepicrft/32/43978_2.png) [@pepicrft](https://forums.swift.org/u/pepicrft)\
**Post date:** [July 18, 2023, 1:12pm UTC](https://forums.swift.org/t/xcode-project-targets-as-containers-for-swift-macros-and-plugins/66226/1 "2023-07-18T13:12:45Z")

</div>

Hey there,

Big props for introducing the compile-time extensibility via macros, it really broadens the horizon for us devs.

I noticed something though - looks like Swift Packages got the exclusive pass to bring in macros during the **build time**. I'm guessing this might have something to do with their portability game compared to the usual targets in `.pbxproj` projects.

That's a bummer for tools like [Tuist](https://tuist.io/), which I happen to take care of. See, Tuist works hand-in-hand with Xcode projects and does some pretty neat stuff, like building focused Xcode projects that only pack what you need for the task and swapping out dependencies with their binary versions.

Any thoughts on tweaking the `.pbxproj` schema to play nice with targets that have plugins or macros? Or is the vibe more about moving away from `.pbxproj` and getting cozier with Swift Package Manager's system?

It'd be cool to get your take on this. It would help plan what's next for Tuist. I bet the CocoaPods folks might also want to know what's up, especially if they decide to get onboard with Swift Plugins and Macros from Pods.

Thanks a bunch!

Cheers.

---

<div class="post-metadata">

**Author:** ![erudel](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/erudel/32/28899_2.png) [@erudel](https://forums.swift.org/u/erudel)\
**Post date:** [September 27, 2023, 2:38am UTC](https://forums.swift.org/t/xcode-project-targets-as-containers-for-swift-macros-and-plugins/66226/2 "2023-09-27T02:38:45Z")

</div>

Not sure if this answers your question, but there is this other post with guidance on how to integrate (compiled) macros in CocoaPods: [How to import macros using methods other than SwiftPM](https://forums.swift.org/t/how-to-import-macros-using-methods-other-than-swiftpm/66645)

---

<div class="post-metadata">

**Author:** ![pepicrft](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/pepicrft/32/43978_2.png) [@pepicrft](https://forums.swift.org/u/pepicrft)\
**Post date:** [November 8, 2023, 11:04am UTC](https://forums.swift.org/t/xcode-project-targets-as-containers-for-swift-macros-and-plugins/66226/3 "2023-11-08T11:04:24Z")

</div>

It does @erudel. Thanks a lot for sharing the resource 🙏
