Questions tagged [nshttpcookie]

An NSHTTPCookie object represents an HTTP cookie. It’s an immutable object initialized from a dictionary containing the cookie attributes.

Two versions of cookies are supported:

  • Version 0: This version refers to “traditional” or “old-style” cookies, the original cookie format defined by Netscape. The majority of cookies encountered are in this format.
  • Version 1: This version refers to cookies as defined in RFC 2965, HTTP State Management Mechanism.
72 questions
0
votes
1 answer

WebView iOS don't save sessions or cookies

I have a UIWebView in my app that accesses a particular page login, if I enter using the existing webview in my application it appears that the session or cookie are unsaved (and I can't go ahead). But if I try the same thing using the browser…
Lacrifilm
  • 213
  • 2
  • 15
0
votes
2 answers

NSHTTPCookie: expiresDate is always null

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…
user2924482
  • 6,844
  • 16
  • 65
  • 133
0
votes
1 answer

Pass cookie to UIWebView - iOS

I have an iOS application which allows the user to use Apple's built in Accounts/Social frameworks to login via Facebook. One question I have is, is there a way to pass user auth cookie from ACAccountStore to a UIWebView? This will mean that, if a…
0
votes
1 answer

Persist Cookies across applications ios

I am trying to persist cookies across 4 applications, I am aware with iOS 8 NSUserDefaults can be used to persist data across application groups using [[NSUserDefaults alloc] initWithSuiteName:@""]; Can cookies be available across…
work_gg
  • 99
  • 1
  • 11
0
votes
1 answer

NSHTTPCookie cookiesWithResponseHeaderFields

When making a call to an API, I receive this as response: { URL: https://insula.magister.net/api/sessie } { status code: 201, headers { "Cache-Control" = "max-age=120, private"; "Content-Length" = 0; …
jbehrens94
  • 2,121
  • 5
  • 24
  • 54
0
votes
0 answers

I am surprised after getting this great error "Cannot Find interface declaration for NSHttpCookie"

I am new on IOS. I am going to use JSON web services. In my NSHttpCookieAddition class , I found this error. What will be the solution. Can anyone help?
0
votes
1 answer

Restrict from storing cookies in sharedHTTPCookieStorage

Can we restrict from storing cookies in sharedHTTPCookieStorage by default? I am using other approach for session authentication and don't want cookies to be sent to server on each server request. Currently I read all cookies from…
Azhar Bandri
  • 842
  • 14
  • 26
0
votes
1 answer

iOS: Storing cookie that expires on session

I have to set NSHTTPCookie such that it expiry is set to Session. I used the following code to set properties of that cookie. NSMutableDictionary *cookieProperties = [NSMutableDictionary dictionary]; [cookieProperties setObject:@"mycookiename"…
hariszaman
  • 7,457
  • 2
  • 35
  • 53
0
votes
1 answer

ASIHTTPRequest vs NSHTTPCookie Cookie response issue

I'm trying to get a cookie from the server so with username and password and cookie I can login to the server. In ASIHTTPRequest I get the cookie as JSESSIONID=Pt1vcPv0TbaRsK2J6nnWuHu4.pard; Path=/parity,JSESSIONID=z9Gf40eSCVsF3xYcG-yrONsU.pardemo;…
CAN
  • 1,487
  • 4
  • 16
  • 26
0
votes
1 answer

How to store a $_SESSION, Objective-C

Is there any way to catch and store a $_SESSION in Objective-C at all? I know that both session and cookies is extremely intertwined, so is it possible to use NSHTTPCookie to catch it or something? Or is this something i have to handle in the php…
0
votes
1 answer

NSHTTPCookieStorage deleteCookie does'nt work in ios6?

my problem that the below code: [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie]; works fine with ios 5 but with ios6 cookies are not deleted and the web view still uses the same cookies setted before. Does anyone has an idea…
Mejdi Lassidi
  • 999
  • 10
  • 22
0
votes
1 answer

Setting cookie in NSHTTPCookieStorage

I am trying to take a cookie from NSHTTPCookieStorage and use it for another URL within my App. I am copying a cookie from NSHTTPCookieStorage and then setting the cookie for a different URL in NSHTTPCookieStorage using the copied cookie. I am…
bluefloyd8
  • 2,032
  • 2
  • 22
  • 19
1 2 3 4
5