Hey Everyone,
I have this code:
NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace];
NSString *appPath = [sharedWorkspace fullPathForApplication:appName];
NSString *identifier = [[NSBundle bundleWithPath:appPath] bundleIdentifier];
NSArray *selectedApps =
[NSRunningApplication runningApplicationsWithBundleIdentifier:identifier];
// quit all
[selectedApps makeObjectsPerformSelector:@selector(terminate)];
which is suppose to close any application running from just the name which is: appName (NSString).
When I debug the app and type in the application name into the NSTextField pointing towards appName, it closes my application instead of the other application I want it to terminate. I replied this question on another post but no one is responding so I thought maybe I can get a response if I start a new post... thanks. (THIS IS NOT A DUPLICATE, its just that people don't respond when I reply bakc...)
Thanks.,
Kevin