Tapas Pal
Tapas Pal

Reputation: 7207

Create iOS framework using swift

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.

Upvotes: 2

Views: 177

Answers (1)

Michaël Azevedo
Michaël Azevedo

Reputation: 3896

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

Upvotes: 3

Related Questions