How do you get notified that computer will sleep in a Catalyst app?

前端 未结 0 1696
無奈伤痛
無奈伤痛 2021-01-23 08:31

The problem is that NSWorkspace.willSleepNotification is not available in Catalyst. It relies on the lower-level IORegisterForSystemPower, but that\'s in IOKit and all C-based.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题