I was working on my project and suddenly after editing the code and compiling gave this error:
ld: warning: directory not found for option \'-
L/Use
I tried several of the answers listed but none worked for me. I got the error after updating XCode (while it was still open which may have contributed to the problem)
First, I deleted my Derived Data folder: XCode => Preferences => Locations => Double Click on arrow next to path indicating where the Derived Data folder is. Then "Move to Trash" I don't think that's what the problem was, but it's amazing how many times this has been an issue for me working on different problems.
Second, I 'Quit' the simulator.
Third, I 'Quit' XCode.
Fourth, I opened up my project in XCode again and then did a Clean and Build (found in the Product menu)
Fifth, I ran my project and it worked fine