我正在尝试在 Mac 上创建一个简单的启动器应用程序。
我可以LSUIElement = 1
在父应用程序上进行设置,但是从应用程序启动的子进程在启动时会出现在 Dock 中。
有没有办法可以防止应用程序的图标出现在 Dock 中?这是我目前正在尝试使用的代码。
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"HelloWorld" ofType:@""];
NSLog(@"%@", launchPath);
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:launchPath];
[task launch];
谢谢!