Build input file cannot be found for mergeable library

I have a demo app to explain how mergeable libraries work and I am stuck when archiving.

I have:

Project Demo App Target Framework A Framework B

External Framework Project C (sub-project to Project Demo) Framework C

I have all three frameworks in the demo project's dependencies, linking and embedding. Implicitly find dependencies is OFF (because that is how the actual app I will be applying this to is built)

I can build to sim/device for Debug and for Release. It all works. I can find my embedded resources. I have checked the binaries with otool -l and I can see where frameworks are loaded in Debug but not in Release. Yay!

But when I Archive the app, I get an error only for my External framework (not in the same project as the app) that it cannot find the file ExternalC.framework/ExternalC, even though if I copy the path, the file exists.

Build input file cannot be found: '/Users/MYUSER/Library/Developer/Xcode/DerivedData/MergeableLibrariesDemo-afgemdngqmoznfhczuxrqzkeulhb/Build/Intermediates.noindex/ArchiveIntermediates/MergableLibraries/BuildProductsPath/Release-iphoneos/ExternalC.framework/ExternalC'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'MergeableLibrariesDemo' from project 

Here are the linker commands for the three frameworks:

-Xlinker -merge_library -Xlinker /Users/MYUSER/Library/Developer/Xcode/DerivedData/MergeableLibrariesDemo-afgemdngqmoznfhczuxrqzkeulhb/Build/Intermediates.noindex/ArchiveIntermediates/MergableLibraries/BuildProductsPath/Release-iphoneos/ExternalC.framework/ExternalC

-Xlinker -merge_framework -Xlinker SameProjectA

-Xlinker -merge_framework -Xlinker SameProjectB

Oh ExternalC.framework is an alias to the framework in the Uninstalled Products path

This is only an issue if ExternalC has this set:

//:configuration = Debug MERGEABLE_LIBRARY = YES

//:configuration = Release MERGEABLE_LIBRARY = YES

//:completeSettings = some MERGEABLE_LIBRARY

Any clues as to what I might have misconfigured?

Steve

Removed

Ah here we go! In a Release or Debug build, my framework in Release-iphoneos is an actual framework package. When archiving, it is an alias into IntermediateBuildFilesPath/UninstalledProducts and it seems like the system fails to handle the alias

Xcode 15.3b fixes this issue.

Build input file cannot be found for mergeable library
 
 
Q