Hi @danieldalto! I’m Dosu and I’m helping the Tuist team.
The ARCHIVE FAILED / “Build input file cannot be found” error you’re seeing on AppsFlyerLib.framework/AppsFlyerLib matches a defect in how Tuist generated the -Wl,-force_load linker flag for static xcframeworks — rather than an issue with SwifterPM’s zip extraction.
Root cause: TARGET_BUILD_DIR vs BUILT_PRODUCTS_DIR
PR #10953 introduced automatic -force_load for static xcframeworks linked by dynamic targets, pointing the flag at $(TARGET_BUILD_DIR). During an archive build (ACTION=install with SKIP_INSTALL=YES), these two directories diverge [1]:
| Setting | During archive |
|---|---|
BUILT_PRODUCTS_DIR |
ArchiveIntermediates/<scheme>/BuildProductsPath/<Config>-<sdk> |
TARGET_BUILD_DIR |
ArchiveIntermediates/<scheme>/IntermediateBuildFilesPath/UninstalledProducts/<sdk> |
Xcode’s ProcessXCFramework extracts the slice into BUILT_PRODUCTS_DIR, but the flag pointed at TARGET_BUILD_DIR — a path nothing writes to. Xcode treats that path as a build input node, so the missing file aborts the archive with exactly the error you saw. This was masked on simulator builds (where the two dirs are identical) and only surfaced on device archives [1].
Fix
PR #12202 (merged 2026-08-12) removes the automatic -force_load behavior from StaticXCFrameworkModuleMapGraphMapper entirely, since the automatic force-loading was demonstrated to be unsafe for arbitrary vendor static xcframeworks (duplicate symbols, duplicated ObjC metadata, undefined references from previously unselected archive members) [2].
What to do
- Upgrade past 4.204.0 to a version that includes PR #12202. Check your changelog or
tuist --versionto confirm. - If you explicitly need force-load behavior for AppsFlyerLib, you can opt in per-target via
PackageSettings.targetSettings[2]:PackageSettings(targetSettings: ["AppsFlyerLib": ["OTHER_LDFLAGS": .string("$(inherited) -Wl,-force_load,$(BUILT_PRODUCTS_DIR)/AppsFlyerLib.framework/AppsFlyerLib")]])
The symptoms you describe (xcframework directory exists, binary inside the slice absent) more precisely match the stale TARGET_BUILD_DIR linker path than an incomplete download/extraction. If upgrading doesn’t resolve it, posting the full CI logs — particularly a find ~/.cache/swifterpm -name "AppsFlyerLib" -type f after tuist install — would help confirm which layer is at fault.
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.