• 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
Re: Solved: NSHTTPCookieManagerCookiesChangedNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solved: NSHTTPCookieManagerCookiesChangedNotification


  • Subject: Re: Solved: NSHTTPCookieManagerCookiesChangedNotification
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 27 Mar 2007 06:53:35 -0700

I take back all the bad things I said about NSHTTPCookieManagerCookiesChangedNotification yesterday. You have to wait a few seconds, and then run my app's run loop, but it does eventually seem to work.


On 2007 Mar, 26, at 21:27, Jerry Krinock wrote:

According to the documentation, NSHTTPCookieManagerCookiesChangedNotification "can be sent in response to another application’s actions".

That's what I need, but unfortunately, although my app can get and NSLog this notification when itself changes a cookie, nothing happens when Safari changes a cookie.

Another programmer [1] has speculated that an app doesn't receive this notification when it's not the active app, which of course makes it rather difficult to be notified "in response to another application's actions", as documented!

Has anyone gotten an NSHTTPCookieManagerCookiesChangedNotification "in response to another application's actions"?

In general, apps receive notifications when they're not active, don't they? I know I have an app which receives other system notifications. Any ideas why this might not be working?

Jerry Krinock

[1] http://www.cocoabuilder.com/archive/message/cocoa/2005/7/1/140574


@implementation ApplicationController

- (void)clearLoggedInAccount:(NSNotification*)notification {
	NSLog(@"10354 Somebody ate or puked a cookie!") ;
}

...

- (void)applicationDidFinishLaunching:(NSNotification *)note {
     [[NSNotificationCenter defaultCenter]
        addObserver:self
           selector:@selector(clearLoggedInAccount:)
               name:NSHTTPCookieManagerCookiesChangedNotification
             object:nil] ;
	

...

@end

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSHTTPCookieManagerCookiesChangedNotification ? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: MacCode subversion repo
  • Next by Date: Memory Leak in JNI
  • Previous by thread: NSHTTPCookieManagerCookiesChangedNotification ?
  • Next by thread: Confusion regarding -worksWhenModal and -setWorksWhenModal
  • Index(es):
    • Date
    • Thread