Distribute pure swift framework

Hi,


I am struggling trying to compile a cocoa touch framework entirely written in swift and then distribute the output to be linked into another project.

The only way I made to work was to create a workspace and add both the app and the framework projects to it, but that does not really sound like distributing a module to me.

Is there a way to just import the custom framework into another project and access the framework's objects?

All the interfaces and classes in the framework are declared as public. In the other project I managed to import the framework and build with no error but when I try to use any class in the framework I got an undefined symbol error.



Am I doing something wrong or is this not doable at all?


Thanks for your help

It sounds like you are linking against the framework but not including the actual framework in your app bundle. These are (unfortunately) separate configuration steps in Xcode. Select your build target in Xcode and look at the General tab. Make sure the framework is included in the Embedded Binaries section.

Thanks for your reply, unfortunately I already put the framework under the Embedded Binaries section, so that was not the problem apparently.

Anyway I managed to solve it by cleaning the derived data and following this example:


https://kodmunki.wordpress.com/2015/03/04/cocoa-touch-frameworks-for-ios8-remix/

Distribute pure swift framework
 
 
Q