Hive Hive
Sign in

error: external macro implementation type ‘ComposableArchitectureMacros.ReducerMacro’ could not be found for macro ‘Reducer()’

GitHub issue · Open

Metadata
Source
tuist/tuist #6344
Updated
Jun 11, 2026
Domains
Generated projects
Details

What happened?

xcodebuild -workspace App.xcworkspace
-scheme App-DEVELOPMENT
-sdk iphoneos
-skipMacroValidation
-archivePath $PWD/build/App.xcarchive
-destination ‘generic/platform=iOS’
-configuration DEVELOPMENT
-verbose
-derivedDataPath $PWD/build/DerivedData
clean build archive | tee build.log

If you type the above command, it will fail because it can’t find the macro. But Xcode builds and runs the app just fine… Looking at the error log, I see that Other swift flags refer to the path Debug-iphoneos path is referenced in the Other swift flags of the module. The path where the actual macro files are downloaded is DEVELOPMENT-iphoneos, so it seems that the macro is not there and cannot be referenced.

When Xcode is built locally, it gets it from DEVELOPMENT-iphoneos, and when it is built from only the macro files are moved to the Debug-iphoneos path

Translated with DeepL.com (free version)

How do we reproduce it?

When I use macros with a project with TCA and type the above command, I get an error

Error log

error: external macro implementation type ‘ComposableArchitectureMacros.ReducerMacro’ could not be found for macro ‘Reducer()’

macOS version

14.4.1

Tuist version

4.15.0

Xcode version

15.3

Comments
N
naldal Aug 3, 2024

I have same issue

E
Eggsy94 Aug 3, 2024

I ended up not solving it and building it with fastlane

N
naldal Aug 3, 2024

I found didn’t link the TCA package into my dynamic framework. After I set the package all issues are solved.

S
SongJiyeon Aug 8, 2024

I found didn’t link the TCA package into my dynamic framework. After I set the package all issues are solved.

Hi. Could you tell me the solution you did? I’m suffering with this now.

N
naldal Aug 8, 2024

I found didn’t link the TCA package into my dynamic framework. After I set the package all issues are solved.

Hi. Could you tell me the solution you did? I’m suffering with this now.

I just connect the TCA dependency with my framework. There’s no critical issues with Reducer() or ReducerMacro. why don’t you remove TCA dependency and check all tuist code work well? if it has no problem, retry the process to import TCA.

E
Eggsy94 Aug 8, 2024

I found didn’t link the TCA package into my dynamic framework. After I set the package all issues are solved.

Hi. Could you tell me the solution you did? I’m suffering with this now.

If it’s an urgent issue, I recommend using fastlane to build.

P
pepicrft Jan 30, 2025

Hey folks! What are some steps that I can follow to reproduce this issue? Or even better, could you provide a reproducible project? With that I’ll be happy to assist in solving this issue.

AC
aj-cooler Feb 19, 2025

@pepicrft This usually happens with a project with custom build configurations other than Debug and Release.

Image

A
AssasinSC Jan 29, 2026

Replace sdk: "iphoneos” with destination: "generic/platform=iOS" sdk: — Forces a specific SDK for all targets in the build graph destination: — Specifies the target platform but allows dependencies to use their own SDKROOT settings