• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSHTTPCookieStorage doesn't provide the most current set of cookies.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSHTTPCookieStorage doesn't provide the most current set of cookies.


  • Subject: NSHTTPCookieStorage doesn't provide the most current set of cookies.
  • From: Ron Ballesteros <email@hidden>
  • Date: Thu, 30 Jun 2005 22:01:53 -0700

Hi Lists,

I'm currently working on a little app and in my app I need to monitor the [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies].

In my app I have an NSTimer which fires every 3 seconds to print the contents of the shared cookie storage. What I am noticing is that the contents of the array returned by [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies] doesn't seem to be the most current.

For example, when I clear all my cookies in Safari then run my app, it will show the cookies as empty which is correct. Now when I load numerous sites in Safari, I can see through the logs in the Console that my app is still printing cookies as empty when it shouldn't. However when I make my app as the active app, it then notices the change in the shared cookies then prints the cookies that just got loaded. My app only seems to notice changes in the cookies when I make it the current app.

I need a way to monitor for changes in the cookie storage immediately and have my app perform a task even if it is not the current app.
I tried registering for the NSHTTPCookieManagerCookiesChangedNotification notification but I was getting the same results as I mentioned above. My app would only get the notification if I made it active.


Am I missing something on how to use NSHTTPCookieStorage sharedHTTPCookieStorage and how the cookies are updated? I thought it would be immediate?

Thanks.
-r
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Comparing two object classes
  • Next by Date: Using gcc 2 on 10.4.1 with XCode 2.1. Confirmation request.
  • Previous by thread: Re: Comparing two object classes
  • Next by thread: Using gcc 2 on 10.4.1 with XCode 2.1. Confirmation request.
  • Index(es):
    • Date
    • Thread