I'm trying to create a simple framework that has a function that returns "hello name" name being a passed argument. Below is the framework and code trying to call it.
Framework:
public class Greeter { public init () {} public static func greet(name: String) -> String { return "Hello /(name)." } } Code:
import Greeter class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let greetingString: String = Greeter.greet("Bob") print(greetingString) } } When I try typing out "greet("Bob")", what autocompletes is "(name: String) -> String greet(self: Greeter)". And when I manually type "greet("Bob")", I get the error: Instance member 'greet' cannot be used on type 'Greeter'; did you mean to use a value of this type instead?