Understanding NSHTTPCookieStorage for the iPhone

Posted by psychotik on Stack Overflow See other posts from Stack Overflow or by psychotik
Published on 2010-03-26T00:04:40Z Indexed on 2010/05/21 19:20 UTC
Read the original article Hit count: 506

Filed under:
|
|

Maybe I'm missing something, but from Apple's documentation for NSHTTPCookieStorage, I can't help but wonder how this is safe to use.

Does this mean that cookie storage is shared across all apps on the iPhone? If my app makes an Http call that results in some cookies being saved, do all apps now have access to these cookies?

Methods like:

cookiesForURL: Returns all the receiver's cookies that will be sent to a specified URL.

make it look even more suspicious.

Can someone explain how this is OK, and what the class does?

Also, assuming my understanding is flawed and this is indeed sandboxed per-app, do calls made using NSURLRequest automatically save/retrieve cookies from this store or is it the developers responsibility to set request headers before dispatching the request?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cookies