title: How to use AFNetworking to save cookies permanently forever, until the app is deleted from the iPhone?
body: <p>Can someone please show me how to save cookies FOREVER using AFNetworking for iOS?  I'm using ios7 but I think this should not matter?</p>
  
  <p>The use case is that upon successful authentication with a webservice, it gives me two cookies that I need to pass along with every single request. These cookies never expire, or expire years from now.  As long as I have the cookies with each HTTPS request, the user doesn't have to login again.  I understand that AFNetworking automatically persists cookies until you quit the app, but I need the cookies to last forever until the user deletes the app from their phone.</p>
  
  <p>1) Upon successful authentication, the webservice hands me two cookies.  How do I access them? Do I go straight to NSHTTPCookie storage and grab the cookie by its name, or is there an AFNetworking "way" to do this?  </p>
  
  <p>2) How do I save these two magic cookies permanently so that my subclass of AFHTTPClient passes these two magic cookies along  with each request?  Do I just save them inside a keychain or NSUserDefaults or NSURLCredentialsStorage?  Or again is there an AFNetworking way to do this?  I read about a setAuthorization() method inside AFNetworking but I'm not sure if this applies to username/password and cookies as well.</p>
  
  <p>3) How do I delete these cookies the AFNetworking way?</p>
  
  <p>Thanks!!</p>