title: Xcode Swift: how to import a Swift project
body: <p>I have made an Xcode Swift project ("Project1"). In a new project ("Project2"), I have trouble adding project 1. </p>
  
  <p>I have tried adding project 1 to project 2's build phases (target dependancies, compiled sources, link binary with libraries); didn't work. When adding to the compiled sources, it wouldn't work no matter which option I chose (folder references, groups, copy if needed).  </p>
  
  <p>I get no compiler errors at: </p>
  
  <pre><code>import Project1
  </code></pre>
  
  <p>But when I try to use a class from project 1, I get the error "Use of undeclared type". </p>
  
  <p>I have also tried to following links with no success: </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/28987400/external-library-usage-in-xcode">External library usage in xcode</a></li>
  <li><a href="https://stackoverflow.com/questions/4219054/xcode-adding-a-project-as-a-build-dependency">Xcode : Adding a project as a build dependency</a></li>
  <li><a href="https://stackoverflow.com/questions/11036921/xcode-how-to-add-an-external-project">Xcode how to add an external project</a></li>
  </ul>
  
  <p>Both projects are in Swift (iOS). </p>
  
  <p>I'd be very thankful if someone helped me with this issue. </p>
  
  <p><strong>Update:</strong> Project 1 is not a framework - it's an iOS app. I need to use some of its classes in project 2. The problem is that project 1 uses the Objective C library Common Crypto via a bridging header. When I manually add project 1 classes into project 2, I get an error ("unresolved identifier") in the project 1 Swift code that uses Common Crypto. </p>
  
  <p><strong>So in a nutshell:</strong> I have an iOS app (project 1), which is in Swift but uses Common Crypto via bridging header. When I add a number of classes from project 1 into project 2, it cannot resolve the references (in project 1) to Common Crypto variables. </p>