title: Adding CommonCrypto to custom Swift framework
body: <p>I’m building a Swift framework which seems relatively simple. Then I needed to import CommonCrypto.</p>
  
  <p>In the framework’s .h file I added the line </p>
  
  <pre><code>#import &lt;CommonCrypto/CommonCrypto.h&gt;
  </code></pre>
  
  <p>and included <code>Security.framework</code> in <code>Link Binary with Libraries</code> for the framework’s target.</p>
  
  <p>When I build I get the following build error:</p>
  
  <pre><code>Include of non-modular header inside framework module ‘MyKit'
  </code></pre>
  
  <p>I’ve tried changing the <code>Allow Non-modular Includes In Framework Modules</code> to <code>YES</code> and <code>NO</code> and tried every combination for both the framework target and the project with no luck.</p>
  
  <p>The <code>MyKit.h</code>’s Target Membership is set to <code>Public</code> and is ticked for MyKit too.</p>