import Foundation class MyService: NSObject, MyServiceProtocol { func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) { let response = string.uppercased() reply(response) } }