Qt does a great job at abstracting out platform-specific features into platform-independent C++ APIs. However, sometimes you still need to write platform-specific code for features that are not in Qt (e.g. to access the platform’s address book), or to access platform-specific applications (e.g. iTunes) or libraries (e.g. Sparkle). On Mac OS X, almost all interfaces are offered through the Cocoa Objective-C interface, and the interfaces that are written in C++ have been deprecated and will disappear soon in favor of Cocoa. Although the language of Cocoa is different from Qt’s, Qt and GCC make it very easy to call these interfaces from within your application. In this post, I will show how this can be done by making an auto-updating application using Sparkle.
Tag: Mac OS X
Libjingle for Mac OS X
As Kev announced earlier today, we took the dust of our Libjingle branch of Psi, and merged it into the mainline development branch (mainly to ease code management). It is not unusual to discover things when you go through stuff you haven’t seen in a while, and this time was no different: we found out, much to our surprise, that we actually had a working support for Libjingle on Mac OS X all this time! Support for OS X was written several months ago, by defining a new sound card type in mediastreamer (a third-party framework included in libjingle), making use of the cross-platform PortAudio API to do interaction with the audio hardware. We never tested it, so we assumed it didn’t work. Fortunately, a quick test proved that wrong ! So now we are down to one unsupported platform: Windows. Because PortAudio is cross-platform, it should in theory work on other platforms as well, including Windows. However, we have not had the time to test this theory, so it might require some more work. But I’m sure Kev will keep us posted on that !


