刚刚升级到Alamofire 4.0。遇到会话管理器问题。首先实际初始化它:
此前:
let alamoManager = Alamofire.SessionManager(configuration: configuration)
现在:
let alamoManager = Alamofire.SessionManager(configuration: configuration, delegate: SessionDelegate, serverTrustPolicyManager: ServerTrustPolicyManager?)
什么是会话委托对象以及为什么必须立即包含它?什么是信托政策?
答案 0 :(得分:0)
let configuration = URLSessionConfiguration.default
var alamofireManager = Alamofire.SessionManager(configuration: configuration)