title: Build fat static library (device + simulator) using Xcode and SDK 4+
body: <p>It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad.</p>
  
  <p>However, Apple has no documentation on this that I can find, and Xcode's default templates are NOT configured to do this.</p>
  
  <p>I'm looking for a simple, portable, re-usable technique that can be done inside Xcode.</p>
  
  <p>Some history:</p>
  
  <ul>
  <li>In 2008, we used to be able to make single static-libs that included both sim and device. Apple disabled that.</li>
  <li>Throughout 2009, we made pairs of static libs - one for sim, one for device. Apple has now disabled that too.</li>
  </ul>
  
  <p>References:</p>
  
  <ol>
  <li><p>This is a great idea, it's an excellent approach, but it doesn't work: <a href="http://www.drobnik.com/touch/2010/04/universal-static-libraries/" rel="noreferrer">http://www.drobnik.com/touch/2010/04/universal-static-libraries/</a></p>
  
  <ul>
  <li>There's some bugs in his script that means it only works on his machine - he should be using BUILT_PRODUCTS_DIR and/or BUILD_DIR instead of "guesstimating" them)</li>
  <li>Apple's latest Xcode prevents you from doing what he's done - it simply will not work, due to the (Documented) change in how Xcode processes targets)</li>
  </ul></li>
  <li><p>Another SO questioner asked how to do it WITHOUT xcode, and with responses that focussed on the arm6 vs arm7 part - but ignored the i386 part: <a href="https://stackoverflow.com/questions/2793392/how-do-i-compile-a-static-library-fat-for-armv6-armv7-and-i386">How do i compile a static library (fat) for armv6, armv7 and i386</a></p>
  
  <ul>
  <li>Since Apple's latest changes, the Simulator part isn't the same as the arm6/arm7 difference any more - it's a different problem, see above)</li>
  </ul></li>
  </ol>