I checked the new Alamofire installation steps.
Since I need to target iOS 7.0 I wonder if importing the Alamofire.swift
is enough to make it works or not?
Why the documentation states to wrap the functions around a Struct Alamofire
? is that needed to call functions as they were within a Namespace? and in that case have I to wrap the whole file or single functions?
You just have to add this:
//put this on alamofire.swift, then call it as Alamofire.manager.your_method
struct Alamofire {
static let manager = Manager.sharedInstance
}
And after you can use on this way:
Alamofire.manager.request(.GET, videoUrl, parameters: ["foo": "bar"])
.response { (request, response, data, error) in
println(request)
println(response)
println(error)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With