Question

I'm just getting started using Frank for BDD on my iOS project. I'm using RestKit with its "$(BUILT_PRODUCTS_DIR)/../../Headers" header search path. When executing the frank build command, Frank does not seem to interpret the header search path the right way because it can't find the right header files. This causes a failure during compilation.

Is there some setting I need to set, in the Frank/frankify.xcconfig file for example?

/Users/Thijs/Development/CE-App/CE-App/CL-App-Prefix.pch:13:9: fatal error: 'RestKit/CoreData.h' file not found
#import <RestKit/CoreData.h>
        ^
1 error generated.


** BUILD FAILED **


The following build commands failed:
    ProcessPCH /var/folders/w_/mt3n3wgs3xs7819j4nmymn_80000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/CL-App-Prefix-cnfscskocfnirmdnriqzouhitmle/CL-App-Prefix.pch.pth CE-App/CL-App-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Was it helpful?

Solution

My first instinct appeared to be correct. Modifying the Frank/frankify.xcconfig file worked for me.

Since Frank does not place builds in the derived data folder but in the project folder itself you need to point Frank to the RestKit header files relative to the project build folder.

The way I did this was by changing the projects build location in Xcode using project settings > Build > Advanced... > Custom (Relative to Workspace) using the default settings.

Then I added the following line to Frank/frankify.xcconfig

HEADER_SEARCH_PATHS = $(inherited) $(FRANK_HEADER_SEARCH_PATHS) "$(BUILT_PRODUCTS_DIR)/../../Headers" "$(BUILT_PRODUCTS_DIR)/../Headers"

Because of the relative build path you only need one ../ instead of two. By using $(inherited) the building in Xcode is not affected.

Perhaps this way of doing things results in a cluttered build directory but it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top