kLSSharedFileListItemHidden always returns false

Originator:ddribin
Number:rdar://6482251 Date Originated:08-Jan-2009 02:12 PM
Status:Closed Resolved:Behaves Correctly
Product:Mac OS X Product Version:
Classification: Reproducible:Yes
 
08-Jan-2009 02:12 PM Dave Dribin:
Summary: 
Calling LSSharedFileListItemCopyProperty() with the kLSSharedFileListItemHidden property always returns a false CFBoolean (kCFBooleanFalse).  This does not match up with the Login Items user interface in System Preferences or the System Events  AppleScript API.

Steps to Reproduce:
Call LSSharedFileListItemCopyProperty() on all items of the login items list (kLSSharedFileListSessionLoginItems).

Expected Results:
Login items that are hidden should return true.  Hidden Login Items can be seen by opening the Accounts preference pane and clicking the Login Items tab.

Actual Results:
All login items return false for kLSSharedFileListItemHidden. 

Regression:
N/A

Notes:
Only workaround is to fall back to pre-10.5 APIs and use AppleScript (System Events).

Comments

Workaround

kLSSharedFileListItemHidden is wrong property to use. It should be CFSTR("com.apple.loginitem.HideOnLaunch"). On Snow Leopard, you can use the kLSSharedFileListLoginItemHidden constant.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!