Xcode 7 Library search path warning - xcode

This is the warning that it is showing:
directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks' "
Can anyone help resolve the warning?

This is how I fixed this problem
Further to a migration of my Xcode project, from Xcode 6.4 to Xcode 7, I get the warning message below (after compilation) for the Test target :
directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks'
Actually I found something when comparing a new project vs an older one...
In the old project, the warning was only being produced by the test target of my projects. Under 'Search Paths', I found it was including two items under 'Framework Search Paths':
$(SDKROOT)/Developer/Library/Frameworks
$(inherited)
The new project kept the 'Framework Search Paths' empty.
Deleting those entries in my older project then removed the warning.
Notes:
I have not exhaustively compared settings, so there may be additional differences.
Also, just in case if one day you re-encounter one of the two following warning messages, just remember that you will have to do that: if the warning is for option '-L/...' that is Library Search Paths, delete the stuff there. However if the warning is for option '-F/...' that is Framework Search Paths, delete the stuff there.

Based on the error message, it sounds like the first order of business is to get the target's path straightened out. You can edit the paths as shown in the answers to this StackOverflow question. Be sure to check the path for all your targets if you're not sure which is generating the error --- this threw me for a bit after upgrading a project to the Xcode 7 beta; there was a path in the FRAMEWORK_SEARCH_PATHS for the test target that needed to be deleted. The path that was in there was exactly the path you report getting the warning on; removing the path eliminated it.

King-Wizard is essentially correct, to elaborate a little more -
Xcode 7 is looking for your testing framework XCtest.framework in a path that does not exist. The path set by $(SDKROOT)/Developer/Library/Frameworks under 'Search Paths -> Framework Search Paths' is looking for the framework in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks which is not a valid path. You can delete the line $(SDKROOT)/Developer/Library/Frameworks to remove the error and still be able to run tests.
The correct path to 'XCTest.framework' is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks for those that are curious.
I hope that helps.

I had the same error with Xcode 9.2 and here is my solutions without doing by hand:
Click on your project in Project Navigator
Go to targets and click on MyProjectNameTest
Click on Build Settings and Search for “Framework Search Paths”
Under Framework Search Paths, delete the paths and keep the “$(inherited)”.
For those of you that have the following error:
directory not found for option ‘-L/…
that means it’s a Library Error, so you can try follow the below steps:
Click on your project (targets)
Click on Build Settings, Search for “Library Search Paths”
Under Library Search Paths, delete the paths and keep the “$(inherited)”

Related

Xcode 7.1 header not found

During archive Xcode 7.1 does says Restkit/Restkit.h not found but in debug it successfully found the header. It's an old project which do not uses cocoa pods so RestKit is added manually in it. Tried many solutions but not successful. Help required.
Together with your suggestion and this SO post I managed to solve it by adding "$(BUILD_ROOT)/../IntermediateBuildFilesPath/Headers" (recursive) in the project build settings, Header Search Path for Release.
Also set Skip Install = YES (build settings/deployment in the RestKit-project) and changed :
#import <RestKit/RestKit.h> to "RestKit/RestKit.h"
Note. Check in your xcode preferences/locations tab where the derived data is stored. Default is Unique build location. Then look in Finder for the folder IntermediateBuildFilesPath and search for the headers you are missing. Add this folder to the search path.
I had the same issue. I added the following to the Header Search Paths build settings with non-recursive selected, and it solved my issue:
"$(BUILD_DIR)/../IntermediateBuildFilesPath/Headers"
I didn't have to change the import syntax or change any other build settings.
Changing Header Search Paths to:
"$(BUILD_DIR)/../IntermediateBuildFilesPath/Headers" (non-recursive)
was correct way for me, too. For other subprojects, you should change Public headers folder path (Build Settings > Packaging) to
"../../Headers/$(TARGET_NAME)"
in subproject target's settings.
All of the above answers were part of the solution; however, in my case I ran into a detail that had me confused for a little while.
As per the answers above, I also updated the Header Search Paths (under Build Settings) by adding:
"$(BUILD_DIR)/../IntermediateBuildFilesPath/Headers" (non-recursive)
but that didn't work until I realized...
I was only updating the Project, and the Target was keeping the old paths.
So remember to update the Project paths AS WELL AS the Target paths.
ps, I didn't have to change any of the RestKit import statements.

Compiler warning after install Xcode 7 Directory not found for option '-F ...'

I check this answer with no success.
Maybe sounds obvious but I look for inside the path and effectively does not exist the path, but this path is used for Xcode and not for my code (at least not that I know it)
The folder suppose to be here the but it does not exist (create the folder manually but does not fix it)
Somebody have an idea ?
I had the same problem, here's how I solved it:
Go to the "Build Settings" of the Tests Targets (Make sure it's the "Tests" files with the white building block logo) and erase the Framework Search Paths.
Since you claim that the path doesn't exist, I suppose you were looking under the normal file instead of the "Tests". At least that was my mistake.
Good Luck!
I changed the last "Developer" in the Tests target's "Frameworks Search paths" path to "System" (...iPhoneOS9.0.sdk/System/Library/Frameworks) because there is a System/Library/Frameworks directory. My code builds and the warning goes away.
Ups !!
I have the problem in the Test Compiling.
I delete the path and fix it.
I have the same problem. I can temporarily rectify the issue by selecting "Product - Clean" from the menu. It soon returns though.

Cant install GPUImage framework - GPUImage.h not found

i have an app and i want to install GPUImage framework. I did following steps:
1) Adding project to my app. I did following > XCode->Add Files-> then choose GPUImage.xcodeproj, and select "copy items to destination project"
2) Now it says : Next, go to your application's target and add GPUImage as a Target Dependency. Im not really sure how to achieve that, what i did is - in product->Scheme->Edit scheme i add GPUImage.
3) I add libGPUImage.a to Build Phases -> Link binary with Libraries
4) I tried every solution i had found to finally add full path of GPUImage.xcodeproj to header search path. Nothing work at all. There is a warning - GPUImage.h not found. I had tried many ways to add full path here, everything i did found concerning this error, but still, there is an error.
How could i fix that? Maybe i made mistakes in previous steps? I really wonder how i manage to spend many hours just trying to add framework to my app, and still unsuccessfully..
This is what's meant by adding a framework as a target dependency:
Those are all under your project settings. You shouldn't need to do anything with your scheme.
As far as the header file goes, you have to make sure your Header Search Paths are set correctly in your Build Settings. If you look at the sample applications that ship with the project, they have that set to ../../../framework (with the recursive search box checked), which is the relative path to the framework from their project directories.
You need to find what this path is for your application project relative to where you placed the GPUImage source.

Disable warnings coming from a specific folder

I've set up an Xcode project where part of the code (a folder in this case) comes from a svn repository.
The folder is constantly updated by an external partner and it contains .h and .m files. In particular, these files are included in the project since set up as Header Search Paths and Library Search Paths within my Target.
Since, .h files contain a lot of warnings (I receive the Showing first 200 warning only message), Xcode does not allow me to show my code warnings.
Based on this scenario, how is it possible to prevent Xcode to show those warnings for that specific folder?
I followed few discussions within SO (Selectively disable GCC warnings for only part of a translation unit?, Turn off warnings coming from subprojects) but I haven't found a solution yet.
Thank you in advance.
Since I've found a solution I reply to my own question. Hope this can help other people.
A partial solution for the problem can be found here at How to disable new Xcode 4.6 warning for whole project ? “… used as the name of the previous parameter rather than as part of the selector". I upvoted!
Obviously, I'm waiting the vendor will fix the problem since this workaround disable such type of warnings for my own code. And I don't want such type of behavior.
Cheers.

Adding project as dependency in XCode 4.x

With the revamp of XCode I am having a lot of trouble working out how to add make one xcodeproj dependent on another. It was hard enough to work out before but now I am just stuck.
If I drag lib.xcodeproj into app.xcodeproj it just shows up as an item in the project tree and I can't expand it or see build products for linking.
Can someone give me the correct sequence for adding lib.xcodeproj as a dependency to app.xcodeproj (ie it will build if necessary and link to app)
Ahhh just worked out that the reason the lib project was being added as a useless non-expanding item was because I had the lib project open in another window. XCode gave me no indication that this was what the problem was, so I was lucky to stumble across it.
Once I had closed the other window I was able to add the lib project and it showed up correctly as an expandable subtree, as well as now being visible for selection in the app target dependencies.
The Xcode docs don't seem to be available online just now, so you'll have to search the documentation that came with Xcode for the following references. However, you'll find the information you're looking for under the following headings in Xcode Project Management Guide:
Managing Targets (Adding a Target Dependency)
Referencing Other Projects
check out BuildKit project https://github.com/davidmorford/BuildKit .
It damatically reduce project dependency management effort.
Dont forget to add the path to Classes of the lib project to tell your project where to find Header find
Go to build settings, find "Header Search Path", enter full path to the Classes folder

Resources