• 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: NSDistributedNotificationCenter and Helper Tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDistributedNotificationCenter and Helper Tool


  • Subject: Re: NSDistributedNotificationCenter and Helper Tool
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Mon, 16 Sep 2013 00:43:29 +0700

On 16 Sep 2013, at 00:26, Jeff Johnson <email@hidden> wrote:

> You need to use the option NSNotificationPostToAllSessions.

Jeff, you are absolutely right. Now everything works as it should.
Thank you very much!

Kind regards,

Gerriet.

>
>
> On Sep 15, 2013, at 12:15 PM, Gerriet M. Denkmann <email@hidden> wrote:
>
>> I have a Helper Tool, running as root, started via SMJobBless and communicating vie Xpc.
>>
>> Sometimes it does:
>>
>> [[NSOperationQueue mainQueue] addOperationWithBlock:^
>> 	{
>> 		NSDistributedNotificationCenter *d = [ NSDistributedNotificationCenter defaultCenter ];
>> 		NSLog(@"%s will postNotificationName on %@",__FUNCTION__,d);
>> 		//	prints: <CFNotificationCenter 0x7f9f....
>> 		NSDictionary *notificationInfo = ....
>> 		[ d		postNotificationName: 	@"some notification"
>> 				object: 					@"some name"
>> 				userInfo: 				notificationInfo
>> 		];
>> 	}
>> ];
>>
>> But now one ever receives this.
>>
>> This used to work before I switched to SMJobBless and Xpc.
>>
>> Why is this not working anymore?
>>
>> Gerriet.
>>
>> P.S. I did not see anything in the documentation indicating that the NSDistributedNotificationCenter does only work on the main thread.
>> This is just some blind groping in the dark.
>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >NSDistributedNotificationCenter and Helper Tool (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSDistributedNotificationCenter and Helper Tool (From: Jeff Johnson <email@hidden>)

  • Prev by Date: Re: NSDistributedNotificationCenter and Helper Tool
  • Next by Date: Re: RunLoop in Helper Tool
  • Previous by thread: Re: NSDistributedNotificationCenter and Helper Tool
  • Next by thread: Core Data: Primitive Accessors & Ivar-Backed Properties
  • Index(es):
    • Date
    • Thread