Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get cookie from post request when in iOS 8 simulator #396

Open
smoothdvd opened this issue Sep 24, 2014 · 3 comments
Open

Can't get cookie from post request when in iOS 8 simulator #396

smoothdvd opened this issue Sep 24, 2014 · 3 comments

Comments

@smoothdvd
Copy link

But worked in real device(iPhone 5c). I test this with xcode 6.0.1.

@tranhieutt
Copy link

@smoothdvd , I have similar case, I can't get cookie in funtion:

  • (void)applyCookieHeader
    {
    // Add cookies from the persistent (mac os global) store
    if ([self useCookiePersistence]) {
    // NSArray * cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[(NSHTTPURLResponse *)response allHeaderFields] forURL:[[self url] absoluteURL]];
    NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:[[self url] absoluteURL]];
    if (cookies) {
    [[self requestCookies] addObjectsFromArray:cookies];
    }
    }
    ......
    }
    cookies will return blank.

Have you solve it?

@ZuzooVn
Copy link

ZuzooVn commented Aug 25, 2015

Did anyone have any ideas?

@smoothdvd
Copy link
Author

Looks iOS simulator drop the cookie which without path or expires date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants