I'd like to bind certain Info.plist value to a checkbox in my app's
preferences. What's the common approach to doing this? Or is it not
recommended for some reason?
All the best,
Eimantas
Sent from my iPhone
// E.
How does one handle the "App is an agent" setting. Usually found as
"Display app in dock" setting in preferences.
> See these documents for more details:
> <https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html%23//apple_ref/doc/uid/20000012-SW83>
> <https://developer.apple.com/library/mac/documentation/Carbon/Reference/Process_Manager/Reference/reference.html#//apple_ref/doc/uid/TP30000208-CH1g-F08201>
> Like others said, don't modify your Info.plist. It will break your code
> signature, and in some cases you won't have write access either.
Thanks a lot! I will try these.
// E.
> On Tue, Sep 21, 2010 at 11:46 PM, Paul <shado...@gmail.com> wrote:
>> On Tue, Sep 21, 2010 at 10:23 AM, Eimantas Vaičiūnas <enc....@gmail.com>
>> wrote:
>>>
>>> How does one handle the "App is an agent" setting. Usually found as
>>> "Display app in dock" setting in preferences.
>>>
>>
>> Declare yourself as an NSUIElement / LSUIElement / LSBackgroundOnly in the
>> Info.plist, and then promote your app with either -[NSApplication
>> setActivationPolicy:NSApplicationActivationPolicyRegular] or
>> TransformProcessType(). You can transition from a UI element / background
>> app to a full-blown GUI app with a dock icon, but not the other way around.
>> Once you have a Dock icon, you're stuck.
> Stuck as in going back to background mode requires app restart or just
> "stuck" stuck?
As the documentation states, they're one-way transforms. The only way to become a background app again is to relaunch. So I meant you're "stuck" in the foreground state once you make the transition.
- Paul
// E.