title: iOS merge several framework into one
body: <p>After watching the WWDC 2016 video optimizing App Startup time, Apple suggested developer can merge several frameworks (dynamic library not static) into one to improve the app cold start time.
  <a href="https://developer.apple.com/videos/play/wwdc2016/406/" rel="noreferrer">https://developer.apple.com/videos/play/wwdc2016/406/</a></p>
  
  <p>So I downloaded a dummy project here:</p>
  
  <p><a href="https://github.com/stepanhruda/dyld-image-loading-performance" rel="noreferrer">https://github.com/stepanhruda/dyld-image-loading-performance</a></p>
  
  <p>And try to merge two frameworks into one using the following command:</p>
  
  <p>
  <code>libtool -static -o new.framework SwiftyJSON.framework Shimmer.framework</code></p>
  
  <p>And the console returns</p>
  
  <pre class="lang-none prettyprint-override"><code>error:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't map file: SwiftyJSON.framework (Invalid argument)`
  
  error:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't map file: Shimmer.framework (Invalid argument)
  </code></pre>
  
  <p>So my question is how to merge several framework into one? Can we use libtool to do it and how to do it? Many thanks.</p>