![](/img/trans.png)
[英]Minimized macOS application + distributedNotificationCenter (background mode on macOS)
我已經實現了一個 macOS 應用 + 擴展。 擴展可能會通過 DistributedNotificationCenter.default() 和 postNotificationName(_ name: ...) 向應用發送通知。 這些問題與 macOS 上的應用程序生命周期有關 - 如果用戶最 ...
[英]Minimized macOS application + distributedNotificationCenter (background mode on macOS)
我已經實現了一個 macOS 應用 + 擴展。 擴展可能會通過 DistributedNotificationCenter.default() 和 postNotificationName(_ name: ...) 向應用發送通知。 這些問題與 macOS 上的應用程序生命周期有關 - 如果用戶最 ...
[英]Not receiving DistributedNotificationCenter in Swift Command Line Tool
我正在 node.js 中構建一個小應用程序,它使用execa讀取來自已編譯 Swift 應用程序的打印語句。 這個想法類似於 Sindre Sorhus(還有誰!?)請勿打擾 雖然我不是 Swift 程序員,但我整理了一個非常簡單的解決方案。 二進制文件是通過從 CL 運行swift build ...
[英]Distributed notification no longer working in Catalina
我使用分布式通知中心在 safari 擴展應用程序和 MacOS 應用程序之間傳輸數據。 我使用DistributedNotificationCenter.default().addObserver和特定的通知名稱,並使用相同的名稱從 MacOS 應用程序發布通知DistributedNotific ...
[英]How to detect switch between macOS default & dark mode using Swift 3
我想在用戶從默認模式切換到暗模式時更改我的狀態欄應用程序圖標,反之亦然(使用 Swift 3)。 這是我到目前為止所擁有的: 不幸的是,它不起作用。 我做錯了什么? ...
[英]NSDistributedNotifications not distributed between instances of (same) app(s)
在10.7.2上,我很難使標准的NSDistributedNotifications開箱即用。 即使回到剛才的簡單代碼( https://github.com/dirkx/Example-NSDistribtuedNotification-Failing的完整XCode版本),我也會得到如 ...