title: How to include AFNetworking as a Framework for using in an iOS App and Extension via CocoaPods
body: <p><em>NB: This is related to <a href="https://stackoverflow.com/q/28086512/89035">this question</a> on project structure, but I have decided to a vastly the use-case to better abstract the problem.</em></p>
  <h1>Problem</h1>
  <p>How do I include <a href="/questions/tagged/afnetworking" class="post-tag" title="show questions tagged &#39;afnetworking&#39;" rel="tag">afnetworking</a> in my iOS App and an accompanying iOS Extension (<a href="/questions/tagged/ios8-extention" class="post-tag" title="show questions tagged &#39;ios8-extention&#39;" rel="tag">ios8-extention</a>, <a href="/questions/tagged/ios8-today-widget" class="post-tag" title="show questions tagged &#39;ios8-today-widget&#39;" rel="tag">ios8-today-widget</a> or <a href="/questions/tagged/ios8-share-extension" class="post-tag" title="show questions tagged &#39;ios8-share-extension&#39;" rel="tag">ios8-share-extension</a>) via CocoaPods?</p>
  <h1>Issues</h1>
  <ul>
  <li><p>For use in Extensions, AFNetworking needs to be build with <code>#define AF_APP_EXTENSIONS</code>, does this mean I need 2 versions AFNetworking? One for the Extension and one for the App?</p>
  </li>
  <li><p>How do I set up the Podfile so frameworks are built and copied to the correct places? Documentation on <code>use_frameworks!</code> is a bit thin.</p>
  </li>
  </ul>