Last active
August 29, 2015 14:12
-
-
Save PoomSmart/5b127f51c3a5ac72526f to your computer and use it in GitHub Desktop.
(iOS 7+) Check if an application is running by its bundle identifier.
This file contains 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
BOOL isRunning(NSString *bundleID) | |
{ | |
BKSSystemService *systemService = [[BKSSystemService alloc] init]; | |
pid_t pid = [systemService pidForApplication:bundleID]; | |
[systemService release]; | |
return pid != 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment