Saturday, 15 February 2014

ios - Swift: using private framework -


I created an IOS swift framework with Xcode.

After writing the code I have created the project and to test it inside the product folder. Took the framework file.

To test the structure, open a new application and drag and drop the already created .framework file and I added it in the embedded binary list to my application project.

I have written to import it into my ViewController.swift class:

  import frameworkName  

There is no problem, it means that the project looks at the structure when I try to use a public classroom within the framework:

  var x: className?  

I get the following error:

  'className' is unavailable: Swift declaration can not be found for this class  

What does this mean? What's the problem?

When you are referring to a framework in the product directory from your workspace, make sure that The location is "created product" and the file name is just the name of the structure, without any additional path components.

If you are referring to a framework that is not in your workspace, then I would recommend using it instead, copying it directly into your repository will make this version very easy, and will ensure That it is correctly designed for both simulator and device.


No comments:

Post a Comment