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 it. NSTextFinder is more or less identical to the search and find interface used by Safari or TextEdit, including incremental search, window dimming, results highlighting, pattern search and so on. It seems that it was contained as a private class already in earlier OS X versions.

Continue reading “NSTextFinder Magic”

PubSub Framework Recipes: Feed Auto-Discovery

Apple’s Publication Subscription (“PubSub”) Framework is not among the best-documented frameworks. There is a small programming guide as well as a framework reference, but all in all the documentation is scarce. Among the lesser known features of this framework is the possibility to let the framework auto-discover RSS/Atom feeds for any web page you throw at it.

Continue reading “PubSub Framework Recipes: Feed Auto-Discovery”

Cocoa Harvest, 2011

The days get shorter, the nights longer, and people retreat to the fireplace reading books. Publishers have announced quite a number of forthcoming Mac OS X programming titles for autumn and winter. Such announcements don‘t mean that titles are actually published on time, or are published at all, but we can at least look forward to reading them.

Continue reading “Cocoa Harvest, 2011”

Sandbox of Doom

It is said that from November 2011 on all apps on the Mac App Store will have to implement Application Sandboxing. Basically, this mean that an app will run inside its private little sandbox and has only limited access to the world outside the sandbox (see this Apple documentation for more details). While it needs only one click in Xcode to turn on sandboxing for an app, I expect the effects of mandatory app sandboxing on the Mac App Store ecosystem to be quite measurable.

Continue reading “Sandbox of Doom”

Easy Trial Version for Mac App Store Code

After my first apps are now available on the Mac App Store, I wanted to prepare trials versions of these apps (something I should have done before launch, I know). Especially, I wanted to have some code ready to drop in any app to create a trial version and I surely didn’t want to maintain two separate code versions (or targets) for the Mac App Store version and the trial version. The following is a how-to for myself and might be useful also for you, fellow developers.

Continue reading “Easy Trial Version for Mac App Store Code”