Today I got the following error when trying to build my unittest for my Swift package:
ld: framework not found CoreAPIKit
Note that the name of that particular framework (CoreAPIKit) doesn't matter; it's a framework that's only used internally at my client. Now on to the solution... In Xcode, we selected the project, and selected the unittest target, then selected the Build Phases tab. In that tab, there's the Link Binary With Libraries setting.
That setting listed "CoreAPIKit.framework"! So, why does this go wrong?
We removed that framework, then added it again. This time, it was saying "CoreAPIKit" (i.e. without the extension). Now, the unittest target correctly linked.