Two targets, two header files with the same name how to use each header for the right target? Two targets, two header files with the same name how to use each header for the right target? xcode xcode

Two targets, two header files with the same name how to use each header for the right target?


The problem I was having was 2 fold:

  1. You need to remove the header files from the project. If they're in Xcode, in the file manager, then they will automatically be included in the project.

  2. You need to use relative paths to your folders in "User Header Search Paths". I was using ${PROJECT_DIR}/path/to/header/folder which gave the right path, but didn't seem to work properly. Changing the entry to ./path/to/header/folder instead worked fine.


I have 4 targets in 1 proyect and more than 40 headers, the best solution in XCode 8I think the best solution is change the following tag:

Always Search user Paths

To yes an all was fine for me:enter image description here