Hacker News new | ask | show | jobs
by latexr 2034 days ago
> I'm still not sure if it works on unsigned apps

You don’t even need an app; you can show a dialog from AppleScript. Using a shell:

  /usr/bin/osascript -e 'display notification "whatever"'
You can add a title, subtitle, and sound[1]. Adding a custom icon is trickier and does require a built app.

[1]: https://developer.apple.com/library/archive/documentation/La...

1 comments

I knew you can use `osascript` but this still does not tell me if it works with unsigned apps or not. For all we know `osascript` is signed which means it respects the rules.
You can call `osascript` from inside your app, or you can export an AppleScript script as an app. So yes, it works on unsigned apps. It has the same Gatekeeper caveats as any other unsigned app, but there’s nothing about notifications that’s especially locked.
Can I natively call the Objective C API from an unsigned app or not?