Writing a privileged helper tool with SMJobBless()

XPC isn’t an option if you’re trying to elevate privileges (from https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html): By default, XPC services are run in the most restricted environment possible—sandboxed with minimal filesystem access, network access, and so on. Elevating a service’s privileges to root is not supported. SMJobBless will install a helper tool and register it with Launchd, as in … Read more

How to customize disclosure cell in view-based NSOutlineView

Solution 1: Subclass NSOutlineView and override makeViewWithIdentifier:owner: – (id)makeViewWithIdentifier:(NSString *)identifier owner:(id)owner { id view = [super makeViewWithIdentifier:identifier owner:owner]; if ([identifier isEqualToString:NSOutlineViewDisclosureButtonKey]) { // Do your customization } return view; } For Source Lists use NSOutlineViewShowHideButtonKey. Solution 2: Interface Builder The button is added to the column and the identifier set to NSOutlineViewDisclosureButtonKey. Official documentation from … Read more

Fullscreen feature for Java Apps on OSX Lion

I found this on Apple’s Java release notes: Mac OS X 10.7 Lion Fullscreen Support Java applications on Lion can now opt into the Fullscreen window feature per-window. Developers can use the com.apple.eawt.FullScreenUtilities class to mark windows as able to be full screened, and the com.apple.eawt.Application.requestToggleFullScreen(Window) method to programmatically request the window enter and exit … Read more