Alamofire domain = NSPOSIXErrorDomain Code = 2 occurs after updating El Capitan with Xcode 7.0.1

I am using Alamofire 2.0.1 (latest update) and SwiftyJSON to call rest api on my server. But today, after updating El Capitan and Xcode 7.0.1, "Alamofire Domain = NSPOSIXErrorDomain Code = 2" <unexpectedly occurred - error, Some people have the same problem as mine, but there was no answer for this.

Here is my code and it goes. Case with flag and semicolon error.

Hope someone solves this problem :(

Alamofire.request(.POST, "\(kServerUrl)/rest/report/createAccessLog", parameters: parameters, encoding: .JSON).responseJSON
            { _, _, result in
                switch result {
                case .Success(let data):
                    var json = JSON(data)
                    if let header = json["header"]["returnCode"].number where header==0 {
                    } else {
                    }
                case .Failure(_, let error):
                    print("something wrong with fetch createAccessLog \(error)")
                }
        }
+4
source share
1 answer

, Apple release Notes. apple release . iOS- IOS 9.1 TCP/IP, Mac, IP- Macs. loopback-, localhost 127.0.0.1. (22453539). 1 127.0.0.1 IP- Mac.

+1

Source: https://habr.com/ru/post/1609793/


All Articles