I got a little excited about package trait support in Xcode 26.4. So I did some experimenting and ... I think it's great!

https://www.massicotte.org/blog/package-traits-in-xcode/

Package Traits in Xcode

At long last, package traits are now supported in Xcode and I think it's a big deal.

massicotte.org
@mattiem well possible I’m holding it wrong. Looks like Xcode enables the default traits for a package even if they’re not selected in the UI. Did you have any issues with that?
@JamesTech I don’t think so. It certainly seemed like I was able to turn off all traits it if I wanted to. But I only played with it for like 30 mins…

@mattiem strange, I did some more playing and I’m pretty sure I’m seeing something not right. I got the same thing happening with just two Swift packages. One with traits that are enabled by default and another that depends on it but disabling the traits. If I run with swift run works like I’d expect. Run it in Xcode though and the traits are enabled. Got a post on the dev forums, hopefully someone knows what’s up or at least what I’m doing wrong😅

https://developer.apple.com/forums/thread/820911

Xcode always enabling default pack… | Apple Developer Forums