Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 336
Adnan Munir SE Avatar asked Oct 27 '15 06:10

Adnan Munir SE


People also ask

Where is header search paths in Xcode?

Look at Preferences->Locations->"Custom Paths" in Xcode's preference. A path added here will be a variable which you can add to "Header Search Paths" in project build settings as "$cppheaders", if you saved the custom path with that name. Set HEADER_SEARCH_PATHS parameter in build settings on project info.

How do I open a header file in Xcode?

Holding the Command key, click the import/include statement to view the header. Also, you can Command-click on a symbol to jump to the header file that defines it. Alternatively, you can select the pull down menu at the far left of the jump bar, and go down to the "includes" submenu and select the header file to view.

What is header file in Xcode?

The file extensions are pretty much necessary, though, because the build process and Xcode itself rely on them.) The interface section goes into MyClass. h, which is called the header file. The implementation section goes into MyClass. m, which is called the implementation file.


2 Answers

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.

like image 192
FeltMarker Avatar answered Sep 21 '22 06:09

FeltMarker


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.

like image 29
Jason Avatar answered Sep 19 '22 06:09

Jason