8

This error appears after 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? Thanks

raurora
  • 3,623
  • 1
  • 22
  • 29
Dev2014
  • 81
  • 1
  • 3
  • 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? – Ian MacDonald Oct 21 '14 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) – Dev2014 Oct 21 '14 at 19:41

5 Answers5

29

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

enter image description here

The Guy with The Hat
  • 10,836
  • 8
  • 57
  • 75
Max Friedman
  • 445
  • 4
  • 15
  • 3
    The other methods failed for me, this was the one that finally worked for me after I had tried the Ravi Garg's method – DamongoCoder Dec 29 '14 at 07:22
  • 1
    @user35443 I couldn't post images at the time due to my low reputation, sorry! All good now though – Max Friedman Jan 16 '15 at 21:42
  • 2
    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 – Trianna Brannon May 13 '15 at 08:33
  • 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. – vishal dharankar Dec 16 '16 at 19:50
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

GonzoCoder
  • 259
  • 2
  • 6
1

When you rename your Project name,the previous Derived data(With your previous Project name)will be remains in Xcode,so you need to do the following steps:

1.On top bar of Xcode,Window--->organiZer--->projects.
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).
4.Clean and Run your project again.

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

Ravi Garg
  • 542
  • 4
  • 5
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,

-1

Thank you emresancaktar

I also solved it by Select your projectTest file from TARGET In Host Application, select your project from dropdown only if it show custom.

India
  • 403
  • 2
  • 4
  • 16