2

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.

  • I'm not trying to indicate that this is a duplicate, because I don't think it is, but [this question](https://stackoverflow.com/a/42613649/1586231) might be helpful. – Max von Hippel Feb 14 '18 at 20:16
  • Thanks @MaxvonHippel, it's somewhat in the right direction but as I understand it, this regards a specific videoplayer(component) being fullscreen or not. I need to know if app is in fullscreen. – Kristian Erik Tigersjäl Feb 16 '18 at 08:22
  • I don't think all of the answers are specific to the video player - [this one](https://stackoverflow.com/a/38562450/1586231) specifically seems like it might work for arbitrary views. But again, I'm not a Swift guy, and don't know for sure. – Max von Hippel Feb 16 '18 at 19:52
  • 1
    You're probably right. The problem with this code is that it seems to be pulling and I need more of an event/notification-driven solution. – Kristian Erik Tigersjäl Feb 18 '18 at 15:52

0 Answers0