Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift: using private framework

Tags:

I have built an iOS Swift framework with Xcode.

After writing the code I have build the project and took the .framework file inside the Products folder to test it.

To test the framework have open a new application and drag and drop the .framework file previously built and I added it into the embedded binaries list of my application project.

To import it into my ViewController.swift class I wrote:

import frameworkName

No problem until here, this means that the project sees the framework. When I try to use a public class inside the framework with:

var x : className?

I get the following error:

'className' is unavailable: cannot find Swift declaration for this class

What does it mean? What is the problem?