How to set Cookies in Alamofire such that such that every time I kill the app and restart it, the same cookie is sent?
Like this?
let httpCookie = HTTPCookie.init(properties:
[HTTPCookiePropertyKey.version : "0",
HTTPCookiePropertyKey.name : "MYTestID",
HTTPCookiePropertyKey.value : "983724dd3dea4924b8d675b0df08b611",
HTTPCookiePropertyKey.expires : "2027-05-13 09:21:23 +0000"])
if let cookie = httpCookie {
HTTPCookieStorage.shared.setCookie(cookie)
}