I am writing an app that needs to store a cookie.
my plan is to do the following.
// create a ref to shared storage area NSHTTPCookieStorage *cookieJar = [NSHTTPCookieStorage sharedHTTPCookieStorage]; // query the current acceptpolicy (ie want to store it for later...) [cookieJar cookieAcceptPolicy]; /******** This line crashes app ********/ [cookieJar setcookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; NSArray *mycookies = [cookieJar cookies]; ..... do more stuff ..... change it back....
Problem is I can't figure out how to store the result of cookieAcceptPolicy for later use. the docs shows - (NSHTTPCookieAcceptPolicy)cookieAcceptPolicy
, makes no sense to me.
Help appreciated.