Skip to content


10.8 notifications #57

Macmee opened this Issue · 10 comments

8 participants


Is anybody having problems with making desktop notifications show up in 10.8?

Growl works but not natives.


Same here. Any chance the user has to set permission in order to have it work?


I also have the same problem. It seems the thread dies after trying to send the notifications.


My problem is that the notification shows up in notification center, but it never pops up. It just shows in the drawer.


no notifications on 10.9.2 :/


I'm hoping to get #87 included soon, at which time I'll test it all to be sure it works.

Notifications do work for me now (on 10.9.2), although honestly they seem sometimes to only show up in the notification centre but not pop up (just like @christopherjones said above). I have ignored this problem to date, thinking perhaps that it happens only when I'm running the debug version of my app from inside Xcode as opposed to a packaged up version of my app. Not sure how true that is. I'll have more of a dig into that theory sometime over the next week or so.


if two instances of the built app are open at the same time, notifications pop up and work as expected on the second instance for some reason.


#87 is now rolled in. However, this issue is still a problem for me.

@zerosix I tried what you suggested by duplicating the compiled MacGap app and opening both copies but didn't get the results you describe.

I did find that with Xcode quit, the MacGap app did create notifications properly except that they only ever appeared in the sidebar notifications area, and never popped up on my screen (similar to what @christopherjones said above).


Yay for merged pull request :)
As for issue: native notifications popup shown only if application is in background. This is default and documented behavior. This is why it works this way if two instances of the built app are open at the same time, notifications pop up and work as expected on the second instance for some reason.

This can be changed by this in Notice.m

- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification
    return YES;

google shouldPresentNotification for more


@JLarky Woohoo! Thanks so much for clearing this up. Your explanation makes absolute sense — I feel silly for not having realised this as the reason.

I've added a note to the documentation at to this effect.

Do you think we could add the shouldPresentNotification as an option settable from JavaScript?


@jeff-h I was going to add this option, but I didn't have time (I haven't have any experience with Obective C other than in macgap). But If someone else want to implement it, I think it can be done. I think main problem here is to have good API. Proper implementation would require shouldPresentNotification flag for each notification, but then you have to store this flag somehow (and I don't have enough experience to know how), and simplest implementation can just have some kind of setAllNotificationsPresend that will be stored in some kind of global variable for whole app.

This is to say I'm glad I was helpful so far, but I hope you guys would know how to do it best for the rest of this feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.