I have an NSMenu
that I want to update with items pushed to my app through pusherapp and received using the libPusher client library. But events seem not to be received in NSEventTrackingRunLoopMode
.
Given the following snippet:
[channel bindToEventNamed:@"my_event" handleWithBlock:^(PTPusherEvent *event) {
NSLog(@"event received");
}];
And I wait for a push to occur while I maintain the menu open, I expect to receive the event immediately but I only receive it when I close the menu.
I also tried passing the main queue to bindToEventNamed:handleWithBlock:queue:
(using dispatch_get_main_queue();
), to no avail.
So I'm left wondering whether I'm doing something wrong or there's a bug in libPusher?