I'm creating a cookie using NSHTTPCookie. But when I create the expiration date is getting converted to creation date. Here is my code:
NSMutableDictionary *cProperties = [NSMutableDictionary dictionary]; [cProperties setObject:@"31 May 2016 17:04:14 GMT" forKey:NSHTTPCookieExpires]; NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:]; [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie];
Per console output:
<NSHTTPCookie version:0 name:"myCookie" expiresDate:(null) created:2016-05-31 16:32:37 +0000 sessionOnly:TRUE path:"/" isSecure:TRUE>
Any of you knows why my expiresDate is getting switch with created date ?
I'll really appreciate your help.