One NSWindow handling multiple NSDocument instances

Cocoa’s document architecture envisions that a window should only handle one document. However library-type applications may need one window to handle multiple documents so that the user can easily switch between libraries without restarting the application. Here’s how you can hack AppKit so that a single window handle multiple documents.

Bringing Asynchronous Core Data documents to OS X

Core Data now officially supports concurrency and I/O in background threads since OS X 10.7 and iOS 5. In the same release, Apple also brought the document architecture to iOS that leverages this new capability of Core Data. However OS X didn’t get the same level of multicore love. In this post, I’ll show you how to create a multi-core supporting document architecture application for OS X.

Multithreading with Core Data on iOS

The pervasive use of blocks and new nested context in iOS 5 and Mac OS X Lion paved the path to a whole new way of multithreading. Apple has lifted yet another barrier to use Core Data for applications that needs to run on multiple threads. This article teach you how to effectively write multi-threaded apps that uses Core Data as it’s backing store.

Sandboxing the PubSub framework

Are you having trouble sandboxing your app for the Mac App Store? I did and here is my experience on sandboxing News Anchor that uses Apple’s PubSub framework and didn’t play well with the sandbox. This cost me a DTS ticket and you will want to pay attention if your app also consumes RSS/ATOM feed data.

Lion’s sandboxing deadline may have been pushed back, but News Anchor came through and met the original date. Bringing News Anchor into the sandbox cost me one of the two precious DTS tickets in my quota, due to the difficulties in getting the PubSub framework to function in the environment. I’d figured I ought to write this out to contribute back to the Mac Developer community.

Lion "Production" Day One: Xcode snafu

The last (hopefully) last step of my migration to Lion was installing the latest public release of Xcode. Again I hit some snags. On first (and subsequent) launches, Xcode crashes with some undefined references to the iPhone SDK private plugin. The issue was finally resolved by re-installing iTunes 10.5 beta. It was Xcode 4.1.1 and…