I am using Alamofire for network handling in swift and run into one weird error. It seems like we can\'t pass Method enum as parameter.
[Error is on Method para
You have to specify the module from which to lookup object type.
Call Alamofire.Method
Change the enum type name to different &...
$(inherited)
flag, orTarget - > building settings- >ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES, Value type is Boolean, click on the other, change the value to $(inherited) perform - pod update Done
then try to run Your project , error will gone ! (I have tried in my project)
enum 'XYZ'ButtonType {
}
You may have a class declared in two or more places in your application. The error is saying that there is no conclusive way to use this class because there are a couple different places in the code it is declared.
Had this error conflict when using "Moya" and when bridging a c framework, fixed it by implicitly adding Moya.Method
module.
var method: Moya.Method {
switch self {
case .login: return .post
case .register: return .post
}
}
I managed to fix the problem by deleting the Alamofire folder in the pods project manually. Then, I do a "pod install" to reinstall the missing pods.
There are significantly less files in the Alamofire folder after doing this.
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, ...