When I log into my app, my browser's cookie for the same site is lost. Why is this cookie being shared between apps? Logging-in in Chrome does not affect Safari's cookies, how can I emulate that behavior in my App Store app?
I am logging into a website's API and setting a cookie via: [NSHTTPCookieStorage setCookie]
Using the docs, I see two ways to get the cookie storage location:
– initWithStorageLocation:
(Deprecated, Available in Mac OS X v10.6 through Mac OS X v10.6)
and
+ sharedHTTPCookieStorage
It seems like the first one is similar to what I want, using a unique storage loaction that is only usable by my app. But that method is deprecated in Lion? How then do you use a private my-app-only cookie?
By not using the cookie-management of the OS but implementing your own. IIRC Chrome on OSX uses an SQLite3 DB to store cookies and implements several parts of the browser/http/network communication itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With