“File not found”, “linker command failed with exit code 1” in Xcode 4.5.1

Yuvaraj.M picture Yuvaraj.M · Apr 11, 2013 · Viewed 27.9k times · Source

Am developing an existing iOS application and I have to write unit test cases for this project. It is building and running in Simulator 6.0. Whenever I try to test the project, it is showing the error message below. Am not able to figure the exact error.

id: file not found: /Users/Yuva/Library/Developer/Xcode/DerivedData/FlyApp-aexukpgtbathuadgxlnm/Build/Products/Debug-iphonesimulator/FlyApp.app/FlyApp
clag: error: linker command failed with exit code 1 (use -v to see invocation)

Could you please help me to solve this linker error and test the app?

Answer

raja picture raja · Oct 12, 2014

Steps to resolve:

  1. Create new scheme with different name
  2. Delete old scheme

  3. Add new scheme

Where the problem came from:

I changed my product name and disabled the snapshot option. Then, suddenly, this error popped out:

ld: file not found:.././previousproductname.app/previousproductname

Steps I followed unsuccessfully to debug:

  1. Deleted deriveddata, restarted Xcode. - not resolved.

  2. Followed the steps of this: link http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/ - same error; not resolved.

  3. Finally, I changed the Scheme name, deleted my old scheme and added new, have solved my issue.