Kex Kex - 4 months ago 208
Swift Question

Initializing a SessionManager in Alamofire 4.0

Just upgraded to Alamofire 4.0. Having issues with the session manager. Firstly actually initialising it:


let alamoManager = Alamofire.SessionManager(configuration: configuration)


let alamoManager = Alamofire.SessionManager(configuration: configuration, delegate: SessionDelegate, serverTrustPolicyManager: ServerTrustPolicyManager?)

What is the session delegate object for and why does it have to be included now? What is the trust policy?

let configuration = URLSessionConfiguration.default
var alamofireManager = Alamofire.SessionManager(configuration: configuration)