title: Private module map for a framework
body: <p>I'm using <a href="https://stackoverflow.com/a/25250520/849645">this answer</a> to create a module map to create a module for CommonCrypto so I can use it in a framework.</p>
  
  <p>Doing this however means that any projects that I use this framework in have access to CommonCrypto with <code>import CommonCrypto</code> - and even worse, declaring CommonCrypto in another framework and importing this into the project results in <code>Redefinition of module 'CommonCrypto'</code> errors.</p>
  
  <p>I.e. the following setup:</p>
  
  <pre><code>MainProject
      |--&gt; import FrameworkA - module map for CommonCrypto
      |--&gt; import FrameworkB - module map for CommonCrypto
  </code></pre>
  
  <p>Is there a way to create a module map but have it private to that Framework its created/used in? (Much like the <code>internal</code> access attribute in Swift for a Framework).
  The <a href="http://clang.llvm.org/docs/Modules.html" rel="noreferrer">llvm Clang docs</a> show a <a href="http://clang.llvm.org/docs/Modules.html#private-module-map-files" rel="noreferrer"><code>private</code> attribute</a> but I can't work out where to put this in my module map, and it might not even be for this purpose!
  There's also an <a href="http://clang.llvm.org/docs/Modules.html#export-declaration" rel="noreferrer"><code>export</code> attribute</a> but again I'm not entirely sure how to use this...!</p>
  
  <p>This is my module map I'm using for CommonCrypto - the <code>$(SDKROOT)</code> gets swapped out in a build phase to the correct location (for <code>iphoneos</code> or <code>iphonesimulator</code> SDKs):</p>
  
  <pre><code>module CommonCrypto [system] [extern_c] {
      umbrella header "$(SDKROOT)/usr/include/CommonCrypto/CommonCrypto.h"
      export *
  }
  </code></pre>
  
  <p>This works fine (except you can't "go to definition" but I don't mind that) for use in <code>FrameworkA</code> / <code>FrameworkB</code>.</p>