2

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") 
0

1 Answer 1

2

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") 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.