Tapas Pal February 2016

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.

Answers


Michaël Azevedo February 2016

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

Post Status

Asked in February 2016
Viewed 3,946 times
Voted 5
Answered 1 times

Search




Leave an answer