2

I am trying to create an iOS framework using swift. I follow this blog and also few others but the output is not the way I want.

Below is my original source file

public class TestClass: NSObject { // publicVar description public var publicVar: Int = 0 // doSomething description public func doSomething() { print("doSomething method") } } 

After adding the framework into my project it's create an TestFramwork-Swift.h

enter image description here enter image description here

You can see it's not contain my description. I want the framework header files like Apple.

enter image description here

Can anyone help me to figure out this. I am not able to understand where I am doing wrong. I am also not able to add more swift files into my framework.

1
  • For the down voter I want to create iOS framework using swift. That's all. Can you provide me a reference? Commented Feb 8, 2016 at 9:26

1 Answer 1

3

Just use triple slash instead of double slash for comments you want to show in your framework headers.

Sign up to request clarification or add additional context in comments.

9 Comments

Thank you. Can you please let me know how to add more swift file? When I add another one into my project it does not appear to the framework.
What do you mean by "not appear" ? Just be sure that your new file has public classes or variable, and that the file has the "target membership" checked for your framework in the File Inspector.
I added another file where two public classes are defined along with public methods. Also target membership status checked. But when I build the framework only the initial swift file and it's class are coming. Others are not there.
Can you see all your files in your build log then ? img15.hostingpics.net/pics/256702Capturedcran20160208110302.png Maybe you should just delete your framework from the project using it and add the new one manually
Yes it's there. hostingpics.net/…
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.