Tag Archives: Cocoa

Check if Mission Control is Active

Unfortunately, Apple has never provided a public API to programmatically check if Mission Control is active. There are not too many use cases for such a check, but I have encountered one.

One of my apps is using a global … Read more

Detecting Launch At Login Revisited

In the past, I presented two approaches for a sandboxed OS X application to check whether it was launched at login via a helper app or not. Both of them don’t work anymore on OS X 10.8 and newer, but … Read more

NSData Base64 Support

This took me by suprise today, when surfing the OS X Mavericks documentation: The NSData object now has built-in support for Base64 encoding and decoding.… Read more

SMLoginItemSetEnabled Demystified

Have you ever wondered how the SMLoginItemSetEnabled function works? How to remove an application from launching at login from outside that application? Well, read on. … Read more

Arrow Buttons

We all know that the user interfaces of OS X apps are becoming more and more differentiated. Apple as well as third party developers slowly move away from the once authoritative OS X Human Interface Guidelines and create not only … Read more

Collecting Code

Here and there I’ve posted several source code examples on this blog. While until now this code was available only within the respective blog posts, I’ve now collected all published examples and for convenient access made them available on a … Read more

The Launch At Login Sandbox Project

Sometimes it is useful for an app to launch at login. While a user can always accomplish this in the system preferences, having the possibility to turn on auto-launching inside the app is better. While in the glorious past this … Read more

NSTextFinder Magic

NSTextFinder is a new Cocoa class added in OS X 10.7. It is basically a container for a find bar to be used with a NSScrollView and lets the user search (and optionally replace) text inside the NSScrollView associated with … Read more

Beautiful Docset Model

The following is the docset data model, found in Xocde’s Lion docset bundle. The SQLite database and a Search Kit index file are also contained in the docset bundle:… Read more