开发者

Helper Application

How do you create a GUI-Less Application that runs in the background without appearing in th开发者_运维问答e dock or in the application switcher.


If it's a background application the still needs to interact with the user, see LSUIElement. If it's really just called to do some processing and never talks to the user at all, you can just make it a Foundation tool or really any other kind of plain vanilla program.


You need to set either LSUIElement (Application is Agent) or LSBackgroundOnly (Application is background only) in your app's Info.plist. LSUIElement is usually for status bar apps, and LSBackgroundOnly for apps that have no UI at all.

You can Apple's documentation on these flags here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜