How would I use NSRunningApplication
? I have something opposite of that which is launching an app:
[[NSWorkspace sharedWorkspace] launchApplication:appName];
but I want to close one. I get an error when I debug the code for NSRunningApp
which is this:
NSRunningApplication *selectedApp = appName;
[selectedApp terminate];
Is there something wrong? if there is please point it out and how to fix it.