title: Saving cookies in Alamofire (Swift)
body: <p>I want to store my cookies so that when i reopen the application i can restore the ones stored in the previous instance.
  To initialize alamofire i use:</p>
  
  <pre><code>let manager = Alamofire.Manager.sharedInstance
  </code></pre>
  
  <p>And my code to load cookies is:</p>
  
  <pre><code>let cookies = NSHTTPCookie.cookiesWithResponseHeaderFields(headerFields, forURL: URL)
  Alamofire.Manager.sharedInstance.session.configuration.HTTPCookieStorage?.setCookies(cookies, forURL: URL, mainDocumentURL: nil)
  </code></pre>
  
  <p>But when i reboot the phone it forgets all the cookies.</p>