'Method' is ambiguous for type lookup in this context, Error in Alamofire 'Method' is ambiguous for type lookup in this context, Error in Alamofire swift swift

'Method' is ambiguous for type lookup in this context, Error in Alamofire


You have to specify the module from which to lookup object type.Call Alamofire.Method


There is probably a name collision. To solve it, you can use the qualified name of the enum (including the module name):

private func apiRequest(method: Alamofire.Method, ...


I have also encountered this problem, because I have declared a number of the same name of the protocol:

protocol SomeProtocol {   static func someTypeMethod()}protocol SomeProtocol {   init(someParameter: Int)}protocol SomeProtocol {   var mustBeSettable: Int { get set }   var doesNotNeedToBeSettable: Int { get }}