How to set Cookies in Alamofire such that such that every time I kill the app and restart it, the same cookie is sent?
Swift 3.0
let cookies = HTTPCookie.cookies(withResponseHeaderFields: response.allHeaderFields , for: response.URL!)
Alamofire.Manager.sharedInstance.session.configuration.HTTPCookieStorage?.setCookies(cookies, forURL: URL, mainDocumentURL: nil)
Alamofire instance is shared singleton, so for all Request the cookie is set. Hope it's works for you.