title: Build Swift dynamic framework with third party static framework as a single framework
body: <p>Trying to prepare a single dynamic framework to my customer. My framework (A.framework) uses third-party recognition static framework (B.framework). I can't provide separate A and B frameworks to the customer.
  Ideally B.framework should be built and included into my A.framework's binary, so the customer's app will only embed A.framework without any additional actions to link with that third-party app.</p>
  
  <p>What I did:</p>
  
  <ol>
  <li>Added B.framework to the project.</li>
  <li>Added B.framework to "Linked Frameworks and Libraries" in the corresponding target.</li>
  <li>Built A.framework.</li>
  <li>Created a demo application and included A.framework to the project.</li>
  <li>Added A.framework to "Embedded Binaries".</li>
  <li>Demo app's build fails with message "Missing required module 'B'" (despite the fact that it is used in A.framework only).</li>
  </ol>
  
  <p>Note: </p>
  
  <ul>
  <li>I neither created any modulemap files for B.framework, nor additional run scripts</li>
  <li>Making A.framework static is not acceptable because it includes some resources (storyboards, icons and some other files)</li>
  <li>Tried to make un-recommended "umbrella" framework but got stuck on loading B.framework's bundle in demo app</li>
  <li>Tried to make fake "umbrella" framework by simply copying B.framework inside A.framework, but got 2 problems - huge size of A.framework and Mach-O error while exporting the demo application (because of Mach-O difference between dynamic A and static B frameworks)</li>
  </ul>
  
  <p>Any ideas would be highly appreciated!</p>
  
  <p><strong>UPD 1</strong>: This is not about umbrella framework because the proper umbrella framework implementation requires to load sub-framework from bundle which is not good. The fake framework implementation (sub-framework simply copied to umbrella) won't work for release because of different Mach-O values - dynamic and static. Plus fake umbrella framework has a huge size because sub-framework is being fully copied inside umbrella. </p>
  
  <p><strong>UPD 2</strong>: Created a small test project: <a href="https://github.com/Semenchikus/StaticFrameworkTest" rel="noreferrer">StaticFrameworkTest</a> which has 3 sub-projects:</p>
  
  <ol>
  <li>Demo-application with dynamic framework dependency (framework A) and shouldn't know anything about framework B</li>
  <li>Dynamic framework with static framework dependency (framework B) which ideally should be included in A framework's binary.</li>
  <li>Static framework B</li>
  </ol>