3 ms·
I'm still salty that the macOS Notification Center was introduced as a "for-pay" API as it initially worked only on AppStore apps and then on signed apps. I'm
by fierarul 6y ago
I'm still salty that the macOS Notification Center was introduced as a "for-pay" API as it initially worked only on AppStore apps and then on signed apps.
I'm still not sure if it works on unsigned apps, but considering all apps must be notarized on macOS, it doesn't really matter anymore.
- latexr 6y 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/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/DisplayNotifications.html#//apple_ref/doc/uid/TP40016239-CH61-SW1 https://developer.apple.com/library/archive/documentation/La...
- fierarul 6y agoI 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.
- latexr 6y agoYou 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.
- fierarul 6y agoCan I natively call the Objective C API from an unsigned app or not?