title: Embed frameworks inside a framework iOS
body: <p>I have a project containing another target(framework) which is a dependency of the main project. That framework requires it's own frameworks, so I've added them using carthage. The project compiles and runs fine on simulator, however I'm getting the following error when running it on a physical device:</p>
  
  <pre><code>dyld: Library not loaded: @rpath/Subframework.framework/Subframework
    Referenced from: /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/MyAppSDK
    Reason: no suitable image found.  Did find:
      /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework: mmap() error 1 at address=0x00798000, size=0x00060000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework
  </code></pre>
  
  <p>I have tried <a href="https://stackoverflow.com/questions/28740268/dyld-library-not-loaded-for-a-framework-within-a-framework">this</a>, however the only solution is to add the Subframework to "Embed frameworks" to top level project, which is not viable. I've tried modifying Build Settings -> Linking -> Dynamic Library Install name, however it didn't help.</p>
  
  <p>How can achieve make it work on the iphone?</p>