alamofire
How to assign rawValue of enum to variable with ObjectMapper?
You don’t have to pass an argument at all. All you have to do is to specify enum type as generic argument and ObjectMapper will take care for all enum initialization procedures. typeEnum <- (map[“type”],EnumTransform<LevelType>())
XCode 12: ‘SessionDelegate’ has different definitions in different modules
You can try SWIFT_INSTALL_OBJC_HEADER = NO, it works for me
Unit Testing HTTP traffic in Alamofire app
I’m adding another answer since I’ve just found this approach that in my opinion is easier and really simple to read and use. I’ve created a dummy Alamofire class that contains only the functions and the types necessary for tests. Now I include this file in the test target instead of the real Alamofire. For … Read more
Cancel a request Alamofire
Alamofire 4 / Swift 3 / Xcode 8 You can cancel a single request as below: 1 – First get the request: let request = Alamofire.SessionManager.default.request(path!, method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: createHeader()).responseJSON { response in switch response.result { case .success(let data): success(data as AnyObject?) case .failure(let error) : failure(error as NSError) } } … Read more
Alamofire returns .Success on error HTTP status codes
From the Alamofire manual: Validation By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling validate before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. You can manually validate the status code using the validate … Read more
Alamofire No Such Module (CocoaPods)
The Trick for me was to open the .xcworkspace file rather then the original project file itself.