Header file not found in Xcode 7
<p>I'm creating a framework which embeds some C libraries. The C libraries code is exposed to Swift using a <code>.modulemap</code> file. In the <code>Build Settings</code> of the target, under <code>Swift Compiler - Search Paths</code> section I set path to the <code>.modulemap</code> file in <code>Import Paths</code> row. Also under <code>Search Paths</code> section, paths for libraries and headers are set, in <code>Library Search Paths</code> and <code>Header Search Paths</code> rows respectively. After adding framework to the app's project and trying to build app, it fails with error <code>pjsip.h file not found</code>.</p>

<ul>
<li>Values of <code>Header Search Paths</code>:</li>
</ul>

<p><a href="https://i.stack.imgur.com/025GG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/025GG.png" alt="enter image description here"></a></p>

<ul>
<li>Structure of headers folders</li>
</ul>

<p><a href="https://i.stack.imgur.com/9OIAW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9OIAW.png" alt="enter image description here"></a></p>

<p>The import process starts with highlighted blue file <code>pjsua.h</code> which then imports other headers, those marked with red rectangles.</p>

<ul>
<li>The complete list of imported headers in <code>pjsua.h</code></li>
</ul>

<p><a href="https://i.stack.imgur.com/Ed3xv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ed3xv.png" alt="enter image description here"></a> </p>

<p>You can see that imported headers are not living in same folder as <code>pjsua.h</code> as should be for successful import, but isn't this the job of the <code>Header Search Paths</code> to find the headers ? I don't want to mess the structure of the headers folders, cause it's a third party lib and each time it will be updated each time this 'magic' must be done. The include path is defined in <code>Other C Flags</code> row which is same as settings <code>Header Search Paths</code>. I'm not sure what I've missed.</p>

<p><strong>Note:</strong></p>

<ol>
<li>Headers paths are right.</li>
<li>They don't contain any spaces.</li>
</ol>

<p>P.S <a href="https://stackoverflow.com/questions/14134064/how-to-set-include-path-in-xcode-project">This</a> doesn't help.</p>

<p><strong>Update:</strong></p>

<p>This error is showed only when building for Simulator, building for real device Xcode fails with multiple errors <code>Redefinition of ...</code></p>