I am new to objective-c. I tried to run an app as part of my launchd application using openApplicationAtURL() API but I failed. I did R &D also but I haven't found any example
I have an app NetopsFilter.app and If I run this app with '--uninstallFilter' argument then it will deactivate the network extension. I tried from terminal and it is successfully deactivating the extension after entering the credentials in the popup.
App path: /Applications/NetopsFilter.app
argument: --uninstallFilter
I tried as below but failed. Please help me to fix this. How can I pass arguments, necessary configuration settings to the API.
Code Block NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; NSURL *url = [NSURL fileURLWithPath:[workspace fullPathForApplication:@"/Applications/NetopsFilter.app/Contents/MacOS/NetopsFilter"]]; NSArray *arguments = [NSArray arrayWithObjects:@"--uninstallFilter", nil]; [workspace openApplicationAtURL:url configuration:(NSWorkspaceOpenConfiguration *)arguments nil];
Thanks