Hive
Mixed swift/ObjC code and buildable folders
GitHub issue · Open
What happened?
Hello 👋 I’m trying to move from sources/resources/… to buildable folders but I’m having an issue with mixed swift/ObjC targets where swift code cannot see headers included with buildable folders.
I’m wondering if it’s a limitation of buildable folders, a limitation of Tuist, or a problem in my project definitino
How do we reproduce it?
- Use attached project buildable-folders-objc-headers.zip
tuist generate- Build fails
- Set
useBuildableFoldersto false tuist generate- Build succeesds
Error log
If I don’t set headers:
Sources/MixedKit/MixedFacade.swift:5:9: Cannot find 'MixedObjc' in scope
If I set headers:
Trying to add a file at path /Users/df/Developer/komoot/komoot-ios/repro/buildable-folders-objc-headers/Sources/MixedKit/MixedKit.h to a build phase that hasn't been added to the project.
macOS version
26.3
Tuist version
4.152.0
Xcode version
26.3
This is a known limitation of buildable folders with mixed Swift/Objective-C targets. Unlike Xcode, which automatically filters out header files from the sources build phase, Tuist’s buildableFolders doesn’t perform this filtering, causing build errors when directories contain both source and header files (related issue).
You can try configuring headers using BuildableFolderException with publicHeaders and privateHeaders arrays, but there’s currently no API to exclude files from buildable folders.
Recommended workaround: Use the sources attribute instead of buildableFolders for targets with mixed Swift/Objective-C content, as it mimics Xcode’s behavior by handling headers automatically.
If you’d like to debug this further with a coding agent, you can install this skill following the steps in the agent-skills repo and use an AI coding agent (Claude, Codex, etc.) to investigate the generated project.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.