Mac OS X 10.11.3 El-Capitan, XCode 7.2.1, Alamofire 3.5.1 via Carthage
Trying to get the most basic Alamofire example I can think of to work. Although a seasoned developer I am new to XCode so I am sure I am just missing something basic. I setup a new project, added Alamofire via Carthage, added a simple get request in main.swift. Code builds and runs, but nothing from my response closure ever gets called. I added the sleep to try and be sure to wait long enough for the closure to get called. I have Little Snitch on and see that my project is calling httpbin.org. I have tried a variety of the response* methods. But closure never runs, what am I missing?
main.swift
import Alamofire
print("Start")
var x : String = "main"
Alamofire.request(.GET, "https://httpbin.org/get")
.responseString {resp in
print("in response handler")
print("response \(resp)")
x = "response"
}
sleep(90)
print("End \(x)")
Console Output
Start
End main