Artem Kislitsyn Artem Kislitsyn - 1 year ago 69
Swift Question

iOS import swift class from swift using framework

How do I import a Swift class from a framework?

  1. I have Xcode Workspace

  2. I create a Cocoa touch framework with using Swift

  3. I create a Swift class named
    in that Cocoa touch framework

  4. I create a Tabbed Base iOS application

  5. I import my framework in that tabbed iOS application using
    import FrameWorkTest

The application project compiler can't find
How can I import
for use in the main application?

It says that
is not defined. I also want to add an extension in FrameWork an then use it.

I'm using this Tutorial

I'm on Xcode version 6.0 seed


Answer Source

Here's one solution I found:

  1. Create new iOS project
  2. Press on project
  3. Press + to add target
  4. In the resulting window, choose cocoa touch framework
  5. Press on project and press add dependency and add framework
  6. Success!

screenshot illustrating the success

I used the solution here: in the project named AddingFrameWork

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download