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.
Dynamic List – Android Development Tip
When I was starting to recode Speech Timer for Android, I realised two things. One, the android tutorial in their website is too verbose for me. I need to read too many documents to get what I need. Second, the default Views of Android are not providing me what my application needs. For this blog entry, I would like to discus about dynamic list generation.
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.
Behold the Holy Array!
The holy array — like the holy swiss cheese — is an array that’s full of holes. Sometimes they’re called sparse arrays. You can use this kind of arrays instead of dictionaries to save some memory when you know that you’ll only be using small nonnegative integer as keys.
Git Client to Manage Remote Repositories on an iPad?
An iPad is the mobile computer of choice for casual computing. How about making quick fixes or other tasks to your git repository? Sure you can do that from an iPad – if using git on the command line is your thing. GUI lovers doesn’t have this luxury. Yet.
News Anchor for Mac OS X 2.4.6 Beta 3
Apparently enabling garbage collection in News Anchor 2.4.6 Beta 1 did more harm than good. Thus I’m releasing News Anchor 2.4.6 Beta 3 that fixes the issue.
Wrapping C-Style Callbacks with Blocks
Elegantly handle C-style callbacks with Objective-C blocks. Reduce clutter, improve readability, and a really cool way of wrapping those clunky callback style that’s more than 20 years old!
News Anchor 2.4.6 Beta 1 is available
News Anchor 2.4.6 Beta 1 is out and fixes a compatibility issue with a future version of Mac OS X.
HackerSpace.sg: iOS Developer Meetup
Coverage on the iOS Dev Scout event on March 2012 with my commentaries. The primary topics were iOS in-app purchasing and test-driven development.
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.
Google Reader API for Cocoa
Today I have just made the world a slightly better place. Better for Mac developers, that is. That’s because I have made an open-source Google Reader library for Cocoa. You can download the library from Github: GReader-Cocoa and hopefully you’ll like it enough to contribute patches. Why yet another Google API library? Two reasons why,…
Core Data and Multithreading
Core Data isn’t thread safe and Apple recommends to use multiple contexts instead to handle concurrency. However Apple seems to have forgotten that on Mac OS X, there are hooks like the undo manager that can cause havoc in multi-threaded Core Data applications, even each thread having its own context.
Building mp4v2 library for Leopard compatibility
How to build mp4v2 for Leopard compatibility. 1. Download mp4v2-r355 from the MP4v2 project. 2. Setup these environment variables: export MACOSX_DEPLOYMENT_TARGET=10.5export CFLAGS=”-isysroot /Developer/SDKs/MacOSX10.5.sdk”export CXXFLAGS=”-isysroot /Developer/SDKs/MacOSX10.5.sdk” 3. Run configure with the following command: (refer to mp4v2 issue 58) ./configure –disable-gch –enable-ub=ppc,i386,x86_64 4. Go to the “.libs” directory that contains the compiled mp4v2 library and adjust the…
