简体   繁体   English

osx-如何在没有可见UI的情况下实施OSX服务?

[英]osx - How to implement a OSX service with no visible UI?

I am trying to create a Service for Finder, but my application doesn't need to have an UI. 我正在尝试为Finder创建服务,但是我的应用程序不需要UI。 Well I need an UI only to request for more information from the user, which my app might need sometime. 好吧,我只需要一个UI即可请求用户提供更多信息,而我的应用有时可能需要这些信息。

But the app should launch without any UI and no icon in the dock. 但是该应用程序应该在没有任何UI且停靠区中没有任何图标的情况下启动。 How do I do that? 我怎么做? I tried deleting the xib file but now I get "Could not connect the action buttonPressed: to target of class NSApplication" warning. 我尝试删除xib文件,但现在收到“无法连接操作buttonPressed:到类NSApplication的目标”警告。

Sounds like you want to use LSUIElement . 听起来像您想使用LSUIElement

http://www.cocoadev.com/index.pl?LSUIElement http://www.cocoadev.com/index.pl?LSUIElement

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM