Skip to content

Instantly share code, notes, and snippets.

@PoomSmart
Last active August 29, 2015 14:12
Show Gist options
  • 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