title: Making an iOS framework: including 3rd party libraries and code
body: <p>Im making a static iOS framework. I want to use 3rd party code, lets use <code>AFNetworking</code> as an example, in my framework. <code>AFNetworking</code> is popular. I can sense the namespace collisions now. What is the best practice here? As far as I understand I have 3 options:</p>
  
  <p>1) Build <code>AFNetworking</code> into my framework, exporting the headers. This lets clients use the version of <code>AFNetworking</code> in my library, but they can't use other frameworks that also link <code>AFNetworking</code>. They rely on me for updates to AFNetworking if they build on it.</p>
  
  <p>2) Code against the <code>AFNetworking</code> Headers, but make the third parties include <code>AFNetworking</code> in their projects. This adds an extra step for framework consumers, they have to add <code>AFNetworking</code> source. There may be version incompatibilities in the future, but at least if another framework uses <code>AFNetworking</code> they can use that at the same time.</p>
  
  <p>3) Re-namespace <code>AFNetworking</code> and keep the headers private. This way I avoid namespace collisions in any way, except that it then becomes really hard to update my copy of <code>AFNetworking</code>. The final binary gets a bit bigger but all interoperability issues are resolved. This is a lot more work for me.</p>
  
  <p>Do I have any other options? What are the best practices? </p>