LSUIElement not working

╄→尐↘猪︶ㄣ 提交于 2019-11-27 02:52:50

问题


I have an application that has LSUIElement = 1 in the Info.plist. When I run the application, a dock item and toplevel menu bar is created for it. Why?

EDIT:

I was using a library that was calling TransformProcessType(), clobbering my Info.plist configuration.


回答1:


Go to your Info.plist file, and add a new key-value pair, or type Boolean. Start typing in the key the phrase "Application is agent". It should auto-complete for you. Then check the checkbox.

This is how I create my agent applications, and it works every time!




回答2:


The 1 must be a string, not a number (according to the documentation of LSUIElement). Something to try anyway.



来源:https://stackoverflow.com/questions/2762456/lsuielement-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!