In a Xcode 15.1 in a project I am adding a SPM library.
Project >> Package Dependencies >> + >> added succesfully (without any errors)
Then I make sure that the package is added in:
Target >> Frameworks, Libraries and embedded content
Everything is going well until I am trying to import that SPM. It says "No such module found".
Here is what I have tried so far:
I tried to do this in a fresh project and it worked well.
I tried creating a new app target in same project and still did not work.
I tried comparing the buildSettings but I did not find something worth mentioning.
I tried changing the configuration from main to use Debug prefix.
I tried with other SPM but with no success.
I tried deleting DerivedData and clean build many times.
Is there something that makes SPM not linking the library? I am also attaching the results of the xcodebuild -showBuildSettings command if you can find something.
Can someone shed a light on this one? Thank you in advance.
Thank you for the reply @Diggory, yes doing it in another project works well as you did. The problem seems to be in this specific project and I do not know how I can find the root cause.
Any ideas or debugging tips would be highly appreciated
For future readers
After hours of investigation I think I finally found the culprit behind it.
It's the CONFIGURATION_BUILD_DIR that was overriden in this project.
Changing the configuration so that it matches the CONFIGURATION_BUILD_DIR did the trick.
Seems like that SPM is using the configuration name as a CONFIGURATION_BUILD_DIR .
But the app target was making the StagingDebug-iphoneSimulator which was different.