I am trying to create a simple launcher application on the Mac.
I am able to set LSUIElement = 1
on the parent application, but child processes launched from the application appear in the Dock when launched.
Is there a way that I can prevent an icon for the application from showing up in the dock? This is the co开发者_Python百科de I'm currently trying to use.
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"HelloWorld" ofType:@""];
NSLog(@"%@", launchPath);
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:launchPath];
[task launch];
Thanks!
精彩评论