I am trying to setup Unit Testing for my project. It is an existing Objective-C app, that I have recently added one Swift class to. I have setup the \'MyProject-Swift.h\' an
Thanks to @gagarwal for figuring this out. In our case the product name has a space, which is collapsed in $PROJECT_NAME
, so I had to hard code it. Additionally, by using $CONFIGURATION_TEMP_DIR
instead of $TARGET_TEMP_DIR
, you can remove the parent directory (../
) from the path. So the solution is to add the following to the Header Search Paths in your test target:
"$(CONFIGURATION_TEMP_DIR)/Product Name With Spaces.build/DerivedSources"
Or, if your product does not contain spaces:
"$(CONFIGURATION_TEMP_DIR)/$(PROJECT_NAME).build/DerivedSources"