As I've reported in this issue when using $(inherited) in LIBRARY_SEARCH_PATHS I'm getting the following linker error:
Undefined symbols for architecture x86_64:
"_swift_getTypeByMangledNameInContextInMetadataState", referenced from:
___swift_instantiateConcreteTypeFromMangledNameAbstract in Backend.o
___swift_instantiateConcreteTypeFromMangledNameAbstract in DP3TSDK.o
ld: symbol(s) not found for architecture x86_64
The only otherplaces where I've seen this issue mentioned have been in relation to React Native projects. The issue above is also in a React Native project.
The workaround is to remove the $(inherited) entry and setting all the LIBRARY_SEARCH_PATHS manually. However, I fail to understand how that makes a difference.
The only thing that is "removed" from LIBRARY_SEARCH_PATHS by doing this is two entries to the swift toolchain:
toolchain/usr/lib/swift/iphoneos
toolchain/usr/lib/swift-5.0/iphoneos
So I'm at a loss to understand what's going on.
The symbol in question is part of the swift runtime.
It sounds like you're trying to link against an older Swift runtime while targeting a newer OS. swift_getTypeByMangledNameInContextInMetadataState was added in iOS 13.4 IIRC, and is not in older OS runtimes, nor is it in the Swift 5.0 runtime used for backward deployment to pre-Swift-ABI OSes. You shouldn't need to add the toolchain library paths to LIBRARY_SEARCH_PATHS yourself, because Xcode will automatically include those libraries if your minimum deployment target is old enough to need them.