I'm writing an app where I must be notified when any app goes in or out of fullscreen on the system. This was certainly not as straightforward as it seemed. I've googled for a good while now and haven't found anything for Swift, just some objc-code that didn't convert well (my project is in swift). Any idea on how to do this?
What I found was: (OS X) Detecting when front app goes into fullscreen mode
https://github.com/shinypb/FullScreenDetector
EDIT: I've seen and tried some code for this in Applescript but the issueis that it's pulling and not a very effective choice for a background-app. I need a event/notification-driven solution.