Reputation: 3833
I have a custom swift framework that I am trying to access via my project.
The method in my framework is
public func test(url:String, callType:String){
}
and I am trying to access it from my main project with import FrameworkName
FrameworkName.FrameworkSwiftClass.test()
The problem is that it looks like it is looking for
FrameworkName.FrameworkSwiftClass.test(FrameworkSwiftClass)
Why is XCode telling me extra argument when I try
FrameworkName.FrameworkSwiftClass.test(url:"url", callType:"type")
Upvotes: 2
Views: 1842
Reputation: 70098
You are using the method as if it was a static method but it's not, you have to instantiate your class first:
let framework = FrameworkName.FrameworkSwiftClass()
framework.test(url:"url", callType:"type")
Upvotes: 2