title: Attaching a static library to an iphone/ipad application
body: <p>which is the best approach to include a static library with into an application for iPhone or iPad?</p>
  
  <p>I could choose to</p>
  
  <ul>
  <li>compile the library supplying right platform and building a library file with the <code>ar</code> utility and then add as a framework to the project</li>
  <li>including the source of the library .c/.h and compile them together with the application</li>
  </ul>
  
  <p>The first approach seems simpler, because I won't care about managing all specific settings of the library I want to include but how can I create the library both for iPhone and iPad and allow xcode to use the right library upon linking?</p>
  
  <p>The second approach seems more complex since xcode will take care about compiling my application and the library (with different settings I suppose) then how should I go? I can easily add sources of the lib but I'll have to include the make scripts to allow xcode use them to build in the right way.</p>
  
  <p>Any suggestions about how to proceed? The library I'm trying to include is <strong>libssh</strong>. (I know that this library, of course, has already been compiled and tried succesfully on iPhone)</p>
  
  <p>Thanks in advance.</p>