There could by many ways,
The first way that hit my mind is to look at runningApplications
in NSWorkspace
. This returns an NSArray containing a dictionary for each launched application. You can loop through the array to see if the app you are looking for is already running.
NSMutableArray *applications=[NSMutableArray new];
[applications addObjectsFromArray:[[NSWorkspace new] runningApplications]];
NSLog(@"--> %@",applications);