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.
© 2022 - 2024 — McMap. All rights reserved.