10

All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:

ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos' ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.

Anyone have any ideas?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user3746428
  • 11,047
  • 20
  • 81
  • 137
  • Why are there both `Mouse_Times_Florida` and `Alton-Towers-Times` in the log? Perhaps you changed the project name and some build settings are out of date? – jtbandes Aug 16 '15 at 21:20
  • Yeah, I changed the project name but I'm not sure what build settings I should be changing? – user3746428 Aug 16 '15 at 21:21
  • You can do a project-wide search for the old name to find if there's anything left over. – jtbandes Aug 16 '15 at 21:21
  • Have you seen this post? http://stackoverflow.com/questions/19594231/is-it-possible-to-change-the-name-of-an-ios-app-via-xcode – Adrian Aug 16 '15 at 21:57

2 Answers2

8

I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"

This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths

Setting location

My project continues compiling and working fine, after removing this option.

veladan
  • 365
  • 1
  • 4
  • 11
5

Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9. This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :

FRAMEWORK_SEARCH_PATHS = (
    "$(SDKROOT)/Developer/Library/Frameworks",
    "$(inherited)",
);

to :

FRAMEWORK_SEARCH_PATHS = "";
FredericK
  • 1,612
  • 1
  • 18
  • 26