I was trying to update a framework that we used before, since they had completely renewed it, there wasn’t just a simple way of updating the files.
In my project I just removed the current framework and added the newer one.
After some testing I wanted to go back to the old version, so I removed the new framework and added the old one again. So basically nothing changed in the code or in the files.
But still, when I try to build my files now, I’m getting this linking error, again, no changes to the code were made.
ld: duplicate symbol _OBJC_IVAR_$_DocumentViewController.thumbPage in /Users/wouter/Library/Developer/Xcode/DerivedData/WiC-dubdfuwbsdrffuatbuonqmpzuvcz/Build/Intermediates/WiC.build/Debug-iphonesimulator/WiC.build/Objects-normal/i386/DocumentViewController-B98A1B42C236E973.o and /Users/wouter/Library/Developer/Xcode/DerivedData/WiC-dubdfuwbsdrffuatbuonqmpzuvcz/Build/Intermediates/WiC.build/Debug-iphonesimulator/WiC.build/Objects-normal/i386/DocumentViewController-B98A1B42C236E973.o for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why would it give me this error if everything is the same as before?
My guess is that Xcode keeps some references (even though I asked to delete them) to deleted files.
Any ideas on how to get rid of this?
Turns out that my “Compile Sources” was keeping a references to the same file previously deleted, trying to delete it didn’t help.
After doing a Clean and Clean build folder the problem was magically fixed.