Skip to content

Instantly share code, notes, and snippets.

@PoomSmart
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PoomSmart/5b127f51c3a5ac72526f to your computer and use it in GitHub Desktop.
Save PoomSmart/5b127f51c3a5ac72526f to your computer and use it in GitHub Desktop.
(iOS 7+) Check if an application is running by its bundle identifier.
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