Created
May 10, 2015 10:06
-
-
Save marvi/641717c10a957475c682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func isEveRunning() -> Bool { | |
| let regularApps = NSWorkspace().runningApplications.filter{$0.activationPolicy == NSApplicationActivationPolicy.Regular}.map{$0.bundleIdentifier!!} | |
| return contains(regularApps, "com.transgaming.EVEOnline") | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After computer suspend/resume this crashes with
fatal error: unexpectedly found nil while unwrapping an Optional valueHow do I check for nil in a filter closure?