title: using bridging headers with module interfaces is unsupported (XCode)
body: <p>I have an XCode (Swift) project which is using native static lib (Swift) and this lib uses another native static lib (C++)</p>
  <blockquote>
  <p>static lib A (C++) -&gt; static lib B (Swift) -&gt; MyProject</p>
  </blockquote>
  <p>first of all, in order to be able to use methods from lib A in lib B, I need to set the <code>bridge</code> file in the <code>BuildSettings</code>, right? then I am free to use any methods from A in B, ok.</p>
  <p>If I try to build the lib B with <code>Build libraries for distribution = NO</code>, everything is compiling and works, but if I need to change this value to <code>YES</code> (in order to distribute the lib as Release ver) I get the error</p>
  <blockquote>
  <p>error: using bridging headers with module interfaces is unsupported</p>
  </blockquote>
  <p>After a little google I found a few possible solutions on SO where most of them suggest setting <code>Build libraries for distribution = NO</code>, but this solution looks for me as a workaround, because in order to distribute the lib as a Release version you need to set it as <code>YES</code>.</p>
  <p>Then I found another solution</p>
  <p><a href="https://developer.apple.com/forums/thread/10419" rel="nofollow noreferrer">https://developer.apple.com/forums/thread/10419</a></p>
  <p>but here one explains that</p>
  <blockquote>
  <p>You'll need to remove the bridging header from where you added it in the Build Settings, in order to get your framework to compile.</p>
  </blockquote>
  <p>But I can't remove the <code>bridge</code> file as if I remove it I don't be able to use lib A in my lib B.</p>
  <p>So, what is the proper solution here?</p>