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…
Supporting Leopard while developing in Snow Leopard
Apparently Apple’s Cocoa method availability documentation is not enough to determine whether something will work on an earlier version of Mac OS X. That is, avoiding 10.6-only methods doesn’t ensure that your application will also work flawlessly in 10.5. As a first-time Mac developer programming an application on Snow Leopard that is also targeted for…
Saving Quartz Composition for distribution
Today I learned a very important lesson when saving Quartz Composer composition files for use in other machines: always save the composition as a flat file. Even though according to Wikipedia that quartz composer version 4.0 saves virtual patches in the composition as a fallback, the composition may not run properly if it isn’t saved…
Choosing a crash reporting system for Cocoa
Are you writing a Cocoa application for Mac OS X? Then you’ll need a crash reporting back-end for your app. If you’re thinking of hosting your own crash reporting system, here are a few open-source libraries that you can consider.
Native iPhone Development 101
My slides about native iPhone development, presented in Singapore PHP User’s Group meet-up.