Swift: Overlooked playground cool stuff #1 Post a system notification. Supports both immediate and scheduled delivery. Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related June 2, 2015 By erica Development, Fun, Swift 5 Comments Tweet this Post Happy Birthday, SwiftHappy Birthday, Swift
5 Comments
Hi,
Is it possible to send user notification from command line swift script?
Yes. Just as easy. You can do it either from a shell script running swift or a command-line compiled swift app
Unfortunately I did not find a way to make it work from command line. People in the internet say that it don’t work without packaging it as application bundle.
Oh d’erp. Here you go: https://gist.github.com/erica/835ffc4c2107a99b6c3a
I saw similar implementation but on obj-c. Didn’t know how to do same thins with swift. Thank you.