8

This error appears after I renamed the project in Xcode:

error: linker command failed with exit code 1 (use -v to see invocation)" and 'Build failed'.

ld: file not found:ld: file not found: /Users/admin/Library/Developer/Xcode/DerivedData/RenameProjectRenamed-glxemlqfmpgiasemfzifmxysyxpn/Build/Products/Debug-iphoneos/RenameProject.app/RenameProject

Do you have some ideas of that?

2
  • You're going to need to post more details that that. There are many reasons that a linker can fail. It displays a verbose log; can you copy the result here? Commented Oct 21, 2014 at 19:36
  • ld: file not found: /Users/admin/Library/Developer/Xcode/DerivedData/RenameProjectRenamed-glxemlqfmpgiasemfzifmxysyxpn/Build/Products/Debug-iphoneos/RenameProject.app/RenameProject clang: error: linker command failed with exit code 1 (use -v to see invocation) Commented Oct 21, 2014 at 19:41

5 Answers 5

30

Try building a new scheme of your app. It worked for me!

Enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

The other methods failed for me, this was the one that finally worked for me after I had tried the Ravi Garg's method
@user35443 I couldn't post images at the time due to my low reputation, sorry! All good now though
I spent 2 days going through a million methods and this was the only thing that finally worked for me. Eternally grateful to you @MaxFriedman
If you are in mad rush to submit app to appstore and due to some silly name related thing it got rejected , this is the solution you should go with.
14

Xcode 6 (as of 6.1) forgets to rename the Test Host setting correctly. Go in to the project settings -> Test target settings, and change Test Host setting to match to the new name. See screenshot.

enter image description here

1 Comment

Saved me a ton of time thanks. And as of 6.3.1 still a "feature"
1

When you rename your project name, the previous derived data (with your previous project name) will remain in Xcode, so you need to do the following steps:

  1. On top bar of Xcode, WindowOrganizerProjects.
  2. You can find the arrow mark (->) respect to the derived data of your project, open it.
  3. Clear all the derived data contains in that folder.
  4. Remove the previously installed app from the simulator and testing device (If you are running on device).
  5. Clean and run your project again.

Note: If you still get this error please close the Xcode and reopen it.

Comments

0

Try to create a new project with a new name, then copy (manually) all the files from the previous project. You can also try renaming the files back,

Comments

-1

I also solved it by selecting your projectTest file from TARGET.

In the Host Application, select your project from dropdown only if it show custom.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.