0

I changed the name of my app from X to Y. It was working before, but for some reason it no longer is working after doing a fresh pull. It's giving me this error (from YTests):

ld: file not found: <DerivedData Directory>/X.app/X
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It's looking for X.app instead of Y.app. I've looked through the build settings and it is Y.app everywhere. It's looking for the wrong file inside of Tests. When I disable testing, I can run the app but I still get the error. Any suggestions?

Note: I'm using Xcode6-Beta5.

Dehli
  • 5,950
  • 5
  • 29
  • 44

1 Answers1

6

After digging around, I realized that this was the actual cause of the error. What confused me is that it was working for a while, and then it stopped all of a sudden.

xcode 4 fails to initiate unit tests (with linker error) after I created a new scheme

The solution is:

  1. Go to build settings of the test target.
  2. Search for your old app name.
  3. Replace old app name with new app name. (Linking -> Bundle Loader -> Debug & Release)
Community
  • 1
  • 1
Dehli
  • 5,950
  • 5
  • 29
  • 44