Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replaced notification with PYNC #1
I couldn't get the notifications to fire. After doing some research I found http://objcolumnist.com/2012/07/25/os-x-mountain-lion-api-highlights/ which states: "It is important to note that only signed Apps (Gatekeeper, MAS etc) can post notifications."
However my solution is not the best fix. It uses pync https://github.com/SeTeM/pync which is a Python wrapper for terminal-notifier. If terminal-notifier is not present then nothing happens, else it works just fine.
Hope this helps. Thanks for writing this software!
Nice man, thanks for your effort :))
I'm not really convinced though that an added dependency on psync + terminal-notifier is the best solution for this problem. The vanilla system version of Python on Mountain Lion should be codesigned correctly and therefore allowed to post NSUserNotifications.
From what I gathered, notifications seem to work fine for most people. Then again you're already the second person that reports that there is some issue with them ;). The issue seems to show up more often on developer's systems. Maybe there is some problem with the system (codesigned) version of Python getting replaced by another install that is not codesigned.
I think we should investigate more in this direction... I definitely appreciate your work on this though. I've updated my blog article with a link to your code (and homepage).
You're right. PYNC + terminal-notifier is definitely not the best, but between that or it not working at all I would prefer the latter.
That is interesting that it is working on other people's systems. When you run "python" in terminal, what does it greet you with?
We seem to be on the same Python version.
May I suggest an alternative fix for people with multiple python installations?
this is naively suggested in the hopes that no one on mountain lion actually replaced the default system install of python.
referenced this pull request
May 22, 2013
I've made progress on the "notifications not displaying" issue. Code-signing seems to make no difference (though it is still a good idea to go with the system default Python in
The trouble is that, in order to post NSUserNotifications, binaries must be packaged as application bundles (StackOverflow Question). This requirement seems to have been added by Apple lately, as the original extension code worked fine for me.
Delivering a proper application bundle is obviously very difficult (impossible?) to do in an Alfred extension. Luckily, this very smart man, @norio-nomura, found a solution: Use method swizzling to make
I've implemented this in af464b4. So far it's working well. Could you please check if it works on your machines? Thanks!
I'm pushing the updated