title: Objective-C: How to make a Framework?
body: <p>I'm new to Objective-C but has a lot experience with Java and .NET.</p>
  
  <p>I'm trying to add <a href="https://github.com/enormego/PhotoViewer" rel="nofollow">EGOPhotoViewer</a> to my iOS 5 project in Xcode 4.2.1. But I get a lot of release, dealloc, retain etc. issues while compiling their code, since I'm using <em>Automatic Reference Counting</em> (I think!).</p>
  
  <p>How can I create a class library, framework or what it is called in Objective C for their code, that I can add to my project?</p>
  
  <p><strong>EDIT:</strong>
  I've done the approach from JeremyP by inserting the code with a new target. I compiled in the beginning, but after a while I get this compile error:</p>
  
  <pre><code>Undefined symbols for architecture i386:
    "_OBJC_METACLASS_$_EGOPhotoViewController", referenced from:
        _OBJC_METACLASS_$_PhotoViewController in PhotoViewController.o
    "_OBJC_CLASS_$_EGOPhotoViewController", referenced from:
        _OBJC_CLASS_$_PhotoViewController in PhotoViewController.o
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Does anybody know why?</p>