I, for one, welcome our new little endian overlords



Cocoalicious on Intel

Originally uploaded by ldandersen.

As people who follow my Flickr photos have already seen, I spent some time at the WWDC Intel lab this week, creating universal binaries of PodWorks and Cocoalicious. Since people have expressed some curiosity about how it went, I thought I’d do a quick writeup on the subject.

Doing Cocoalicious was dead simple. It doesn’t rely on any embedded frameworks or other libraries that don’t ship with the system, and all of its networking code is handled by Web Foundation (which means endinanness is not something it really has to concern itself with), so getting it working was literally a matter of checking the little “Intel” box in Xcode.

PodWorks was a bit tricker. First of all, like NetNewsWire, it relies on several frameworks embedded within the app bundle, both of which need to be built as universal binaries before PodWorks itself can (this actually only caused build problems, most of which only happened because I was trying to get the projects set up on an unfamiliar machine with a new version of Xcode). Second, it statically links eSellerate’s serial number validation library, which is currently only distributed as a built PowerPC binary. This meant I had to strip out the serial number code before I could get it to build. Third, though I swore up and down to people that PodWorks uses NSSwapShortToHost to reverse the byte order of the iPod database’s little endian strings, I was in fact using NSSwapShort instead, meaning (rather embarrassingly ) that I was depending on the host processor being big endian.

As bad as all of that sounds, they’re still (mostly) fairly minor problems that I was able to resolve while sitting there in the lab with people looking over my shoulder, so I think my experience bodes well for 90% of the Mac developers out there. I’m with James Duncan Davidson and Brent Simmons in calling for Steve to bring the Intel based Macs on!

3 Responses to “I, for one, welcome our new little endian overlords”

  1. Feaverish Says:

    Excellent! It’s great to hear that developers of software I use daily aren’t having too many problems.

  2. Jens Alfke Says:

    Hee hee — you got that title from my iChat status message, didn’t you?

  3. Administrator Says:

    No–I thought of it myself! I just liked thought “little endian” sounded like Martian or something :-).

Leave a Reply