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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With